Python: import _io

I am trying to determine which files in the Python library are strictly necessary to run my script. Now I am trying to determine where _io.py is located. In io.py (without underscore), the _io.py module (with underscore) is imported on line 60.

+3
source share
4 answers

Some modules are compiled directly into the interpreter - there are no corresponding files. You can get a list of these modules from sys.builtin_module_names. In my installation of Pyton 3.1, this list is included _io.

You might want to look at snakefood to determine the dependencies of your script.

+6
source

Python Python. _io.so _io.pyd.

+1

DLL python, . .pyd Ignacio. . DLL . python 2.5.

0

python-: _io.py 2.7.4?, Python 2 3 :

Python 2.7:

, _io, :

import _io

_io.__file__

Linux - :

'/usr/local/lib/python2.7/lib-dynload/_io.so'

Windows.

Python 3:

, Python 3.3 _io , _io.__file__ .

0

Source: https://habr.com/ru/post/1792210/


All Articles