organizing many python scripts, in a large corporate environment.

eryksun () eryksun at gmail.com
Tue Mar 15 06:45:05 EDT 2011


On Tuesday, March 15, 2011 12:44:48 AM UTC-4, bukzor wrote:
> When looking at google code search, this kind of code is 
> rampant (below). Is everyone really happy with this?
> 
> sys.path.insert(0,
> os.path.dirname(os.path.dirname(
>                 os.path.dirname(os.path.abspath(__file__)))))

Applications and libraries should be properly packaged (e.g. distutils, egg, rpm, deb, msi, etc). If that can't be done for some reason, then we're stuck with kludges.

If you could just get a .pth file symlink'd to site-packages.



More information about the Python-list mailing list