Re: .pth files in working directory
- From: Peter Maas <peter@xxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 15:07:41 +0200
Peter Hansen schrieb:
Not sure from the above description exactly what it is you want,
I want a tree
top/
install.py
sub1/
__init__.py
mod1.py
sub2/
mod2.pywhere I can do "from sub1 import mod1" in mod2.py no matter what the absolute path of top is. To achieve this I start install.py once to retrieve the absolute dir of itself (= abspath of top/) and creates ..pth files with its absolute dir in every subdirectory.
> 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.
But sitecustomize.py changes the Python installation, doesn't it? This wouldn't be an advantage over putting a .pth file into ..../site-packages.
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
.- Follow-Ups:
- Re: .pth files in working directory
- From: Peter Hansen
- Re: .pth files in working directory
- From: Michael Ekstrand
- Re: .pth files in working directory
- References:
- .pth files in working directory
- From: Peter Maas
- Re: .pth files in working directory
- From: Peter Hansen
- .pth files in working directory
- Prev by Date: Sockets: code works locally but fails over LAN
- Next by Date: Re: use threading without classes
- Previous by thread: Re: .pth files in working directory
- Next by thread: Re: .pth files in working directory
- Index(es):
Relevant Pages
|