469,610 Members | 1,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

.pth - howto?

I was thinking that if I create:
\documents and settings\user\My
and a .pth file in site-packages with something like:
\documents and settings\user\My Documents\my\scripts\py\dirname
then my script __init__.py should run when I import dirname
but it doesn't

My team of trigger-happy lawyers is currently analyzing "Installing
Python Modules", which says:
Paths can be absolute or relative, in which case they're relative to
the directory containing the .pth file.

I've tried specifying the .pth file with
r'\documents and settings\user\My Documents\my\scripts\py\dirname'
but I can't seem to get python 2.4 to pick up an absolute path on

I know I could put my scripts in site-packages, but I quite like the
idea of keeping my scripts and 3rd party scripts separate. Also, I
would prefer not to add "\documents and settings\user\My
Documents\my\scripts\py" to the PYTHONPATH, because as soon as I
install some 3rd party, I tend to write a 'play' script to run it, so I
only want the stuff I specify on the path.

So how do I configure an absolute path in a .pth file on windows?

Nov 22 '05 #1
0 698

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Logan | last post: by
4 posts views Thread by Josef Sachs | last post: by
5 posts views Thread by alejandro lapeyre | last post: by
8 posts views Thread by Topper | last post: by
reply views Thread by Andrew Dalke | last post: by
4 posts views Thread by Marco Meoni | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.