Package organization: where to put 'common' modules?
kent at kentsjohnson.com
Mon Mar 6 02:59:36 CET 2006
Paul Boddie wrote:
> Yes, Python does this - it puts the directory of bar.py (B in this
> case) in sys.path, but not the directory in which you're sitting when
> you run the program from the shell (A in this case).
This seems to be OS dependent. If I put 'print sys.path' at the start of
site.py (which does most of the setup of sys.path), one element of the
path is an empty string. This is expanded by
main() -> removeduppaths() -> makepath() -> os.path.abspath()
to the current working dir.
This is Python 2.4.2 on Win2K.
More information about the Python-list