473,394 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

where to put .pth file

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

Oct 13 '06 #1
0 1378

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robert Misiorowski | last post by:
Hello, Everything started with me wanting to write a little command line php script that uses some gd functions. After a little research, I realized I need to unccomment the line in my php.ini...
8
by: Micha³ Wo¼niak | last post by:
Ok, I have a nice iface, I have a (hopefully) good user authentication, I have a DB up-and-running, and I have PHP 4.3.4 (yeah, I know, I will update...). What I need is a logging utility. And...
15
by: Viviana Vc | last post by:
How can I programatically do the equivalent of the following: cacls "C:\Program Files\test" /T /G Everyone:f ? Thanks, Viv
8
by: John Welch | last post by:
I have a command button with the following code: DoCmd.OpenForm "frmSearchAssignments", , , "SearchAssignmentID = 1" (SearchAssignmentID is the PK, auto number) When it runs, the form opens but...
10
by: vwd2005eeb | last post by:
Visual Web Developer 2005 Express Edition Beta I did Build | Build Web site, where are the DLLs? I was expecting to see maybe one dll for each Web page in a directory (maybe still "bin") under...
1
by: rdemyan via AccessMonster.com | last post by:
I'm trying to implement a licensing scheme. There are three types of licenses: Trial - good for 30 to 60 days Interim - good for 1 year Fully Paid - no expiration Everything is working fine...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
15
by: amit.man | last post by:
Hi, i have newbie qestion, when i write #include <somthing.h> the precompiler subtitue that line with the lines from "somthing.h" header file. when, where and how the compiler insert the...
3
by: v.davis2 | last post by:
Hi all, I am attempting to use Access97 as the database to hold the results of a python script. I seem to be able to make simple SELECT clauses work (like SELECT * FROM TableName), but have not...
6
by: littlelisper | last post by:
I want to open an XML file with my browser. The file contains the following line: <?xml-stylesheet type="text/xsl" href="/new.xsl"?> which points to the root node to look for the stylesheet....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.