packages in special directories?
Gordon McMillan
gmcm at hypernet.com
Wed Feb 16 08:02:55 EST 2000
Michal Wallace wrote:
>
> How can I make a .pth file point outside the main python directory?
>
> I have my package development directory organized like this:
>
> c:\zike\code\weblib
> c:\zike\code\weblib\__init__.py
> c:\zike\code\weblib\Sess.py
> c:\zike\code\weblib\Auth.py
> c:\zike\code\weblib\Perm.py
>
> I like having my code under \zike\code for backup purposes,
> and to keep it seperate from work I do for other companies, etc.
>
> Anyway, I want to be able to "import weblib" ... I know I can put
> it in PYTHONPATH, but that's already messy, so I wanted to
> try out the .pth notation..
>
> so I made:
>
> c:\program files\python\weblib.pth
>
> which contains one line:
>
> c:\zike\code\weblib
>
> ... but this doesn't work....
Because weblib is the package. Your .pth file should say
c:/zike/code
- Gordon
More information about the Python-list
mailing list