Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: import _io

I'm trying to determine which files in the Python library are strictly necessary for my script to run. Right now I'm trying to determine where _io.py is located. In io.py (no underscore), the _io.py module (with underscore) is imported on line 60.

like image 362
Paul Avatar asked May 09 '26 08:05

Paul


1 Answers

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

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

like image 111
Sven Marnach Avatar answered May 10 '26 21:05

Sven Marnach