compiling python

Scott David Daniels Scott.Daniels at Acm.Org
Fri Sep 5 21:34:43 CEST 2003


Birgit Rahm wrote:

> Hallo newsgroup,
> because so many people helped me, I hope for help onesmore.
> If I compile a python py file to a pyc file, will there the paths of the
> included files (or other paths) hardly be written to the pyc file and why.
> (Does not find this import file without this path anymore?)
> Which sense is behind there?
> TIA,Birgit

The model is that you import "modules" not files.  As a result,
where you find the module is kind of accidental.  For example,
when I am working on a largish program, I'll have several modules
in my 'current development' directory, get the application to work
with with those updated modules, and then check the modules back in
to the central directories.  If the .pyc files remebered locations,
I might accidentally be testing the accepted code, rather than my
new implementations.

-Scott David Daniels
Scott.Daniels at Acm.Org





More information about the Python-list mailing list