Python modules

Deepfriedice Deepfriedice at openmailbox.org
Mon Nov 10 05:55:27 CET 2014


On 10/11/14 14:55, Steve Hayes wrote:
> I have a book on Python that advocates dividing programs into modules, and
> importing them when needed.
>
> I have a question about this.
>
> I can understand doing that in a compiled language, where different modules
> can be imported from all sorts of places when the program is compiled.
>
> But I understand that Python is an interpreted language, and If I wrote a
> program in Python like that, and wanted to run it on another computer, how
> would it find all the modules to import at run-time, unless I copied the whole
> directory structure over to the other computer?

You copy over the directory structure, or wrap it in a compressed archive.




More information about the Python-list mailing list