Newbie question ... reading modules from directories in Windows
Steve Holden
sholden at holdenweb.com
Sun Dec 31 11:16:29 EST 2000
Peder Jakobsen <jakobsen at home.com> wrote in message
news:5Md36.46251$59.13170408 at news3.rdc1.on.home.com...
> Just a small question:
>
> I have added a "C:\Python20\sandbox" directory to my PYTHONPATH
>
> Now I'm trying to import modules from that directory whole using the
> interactive Python prompt, but it only works if I start python.exe in the
> directory where the module resides.
>
> I thought by adding the directory where the .py files exist to the Path,
> Python would be able to detect them???
>
> Thanks in advance,
>
> Peder Jakobsen, Ottawa
>
>
Did you set an envvironment variable, or did you modify the registry? I
suspect what you need to do is modify the
\HKEY_CURRENT_USER\Software\Python\PythonCode\2.0\PythonPath registry entry.
However, it's a lot easier to establish a sitecustomize.py moduile in your
library, and add any required values to sys.path in there: that way it will
haooen automatically every time Python starts.
regards
Steve
More information about the Python-list
mailing list