How to handle sys.path in bigger projects?

Georg Lohrer GeorgLohrer at gmx.de
Fri Oct 12 03:24:45 EDT 2001


Hello,

I'm just realizing a simulator in telecommunication with Python,
omniORB, tkInter and XML; C++ for testing the simulator will be used,
too. Lines of Python-code have now reached 10.000. The code is devided
in several directories and modules (corba, xml, messages,
remote-control, etc.). Most of the modules need some stuff out of
other modules residing in another directory.

In the main module I'm using the pathconf.py script of Frederic L.
Drake to setup sys.path. So, starting on root-dir of the project all
things run well, but pycheck'ing a module in a 'lower'-directory won't
work because I do not want to add pathconf.py to every module.

My question is: how do you deal with bigger projects and setting
sys.path accordingly:

[  ] Use only one directory and let module-size increase?
[  ] Use multiple directories but add sys.path.append in front of
ervery module?
[  ] .....
[  ] ....

What are your ways of handling?

Probably I've not found the ultimate way to deal with this problem,
but facing that the source-code size increases rapidely I've to
concern about this.

Ciao, Georg




More information about the Python-list mailing list