default import path

P

Peter

<newbie question>
How can I edit the default import path for Python under Windows?

I want to use the piddle module. So far, I've copied the unzipped contents
of the zip file to c:\prog~1\python\lib\site-packages, but how do I set it
so this is automatically on the python path?

(I don't want to have to manually add that directory every time.)

TIA

Peter
 
F

Fabien SK

Peter said:
<newbie question>
How can I edit the default import path for Python under Windows?

I want to use the piddle module. So far, I've copied the unzipped contents
of the zip file to c:\prog~1\python\lib\site-packages, but how do I set it
so this is automatically on the python path?

(I don't want to have to manually add that directory every time.)

Hi,

I added this key in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.2\PythonPath\Some_name

and I set the default value for this key to the new Path

Have a nice day
Fabien
 
P

Peter

this quote is from Fabien SK of Mon, 28 Jul 2003 20:59 :
I added this key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.2\PythonPath\Some_name

Thanks,
seems rather un-python-like to have to do this via an edit to the registry.
I'm comfortable editing config on my Linux PC, but I'd rather not mess with
the registry as Windows is too frail (and it is a friend's PC).
Maybe, it would be better to use a addpath statement in each python script
where I want to use this module.

thanks for you help

Peter
 
P

Peter

this quote is from GerritM of Tue, 29 Jul 2003 06:40 :
create a piddle.pth file in the main Python directory (c:\prog~1\python in
your case?), with the pathname of piddle as line of text in the file:
c:\prog~1\python\lib\site-packages\piddle
(check the last part, this is the directory on my machine)

Thanks!
I'll check it out next time I get to a machine running Windows.

cheers

Peter
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top