where to put .pth file

J

Jim

I am trying to tell Python where it can find some modules it will need
when embedded in my app. The convenient way would be to plop a .pth
file somewhere Python can find it. I found that the doc is wrong when
it says this kind of filecan go anywhere on the python path. It is not
found if it goes into the python root dir, or python\lib -- the only
place I found it would work was in lib\site-packages.

So the next question is, how do I know where this dir is located? In
order to look in the Registry to find where Python is installed, I need
to know the version! There is a set of keys under Python24 and another
set under Python25 on my machine. That means I need to know what
version is installed before I can find out where its install dir is.
Bizarre.

So how do I find out what version is installed? The best way I came up
with so far is to ask Python for the value of sys.prefix. Trouble is,
when I issue a PyRun statement, it fires up 24, not 25, and gives me
the 24 prefix.

In short: how do I find the latest installed site-packages directory?

-- Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top