Re: .pth files in working directory
- From: Peter Hansen <peter@xxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 09:18:31 -0400
Peter Maas wrote:
Peter Hansen schrieb: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.
But sitecustomize.py changes the Python installation, doesn't it? This wouldn't be an advantage over putting a .pth file into .../site-packages.
You can have a local sitecustomize.py in the current directory, which wouldn't change the Python installation. Would that help?
As far as I can tell, the current directory isn't added to the sys.path until after site.py executes, so I don't believe you can rely on .pth files to do anything like what you want. Sitecustomize.py is it, with appropriate smarts inside.
-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
- Re: .pth files in working directory
- From: Peter Hansen
- Re: .pth files in working directory
- From: Peter Maas
- .pth files in working directory
- Prev by Date: Re: .pth files in working directory
- Next by Date: Re: Bicycle Repair Man usability
- Previous by thread: Re: .pth files in working directory
- Next by thread: Re: .pth files in working directory
- Index(es):