Re: .pth files in working directory
- From: Peter Hansen <peter@xxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 08:15:40 -0400
Peter Maas wrote:
My goal is to have the top level of a directory tree in the Python path without touching anything outside the directory. I tried to create .pth files with the top level path in every subdirectory but this doesn't work despite working directory being part of the Python path.
Creating the pth file in .../site-packages works but I prefer to have everything inside the directory tree so that removing the tree is sufficient for a complete uninstall. Any hints are appreciated, thanks.
Not sure from the above description exactly what it is you want, but generally such non-standard sys.path and .pth manipulations are best handled by a sitecustomize.py file, possibly which makes its own calls to site.addsitedir() and such. Try "help(site)" for more.
In this case, I think you'd have a sitecustomize.py which looks for .pth files in the current directory and calls site.addsitedir(), but I'm not sure. Maybe if this doesn't work, an example would clarify things.
-Peter .
- Follow-Ups:
- Re: .pth files in working directory
- From: Peter Maas
- Re: .pth files in working directory
- References:
- .pth files in working directory
- From: Peter Maas
- .pth files in working directory
- Prev by Date: Re: OpenSource documentation problems
- Next by Date: Re: use threading without classes
- Previous by thread: .pth files in working directory
- Next by thread: Re: .pth files in working directory
- Index(es):