Hi,
I'm trying to add a personal folder to the path used by python in
searching for packages and modules. This folder, "C:\docs\ut ils" , has
some packages not yet ready for "site-packages".
First, I tried sys.path.append ("C:\docs\utils ") BUT this only lasts
for the current python session.
Then, I read about PYTHONPATH and went to Control Panel - System -
Advanced - Enviromental Variables, and created a new variable
(PYTHONPATH) containing the folder. However, sys.path does not detects
it.. keeps printing the same old files:
['C:\\Program Files\\AutoHotk ey',
'C:\\Program Files\\Python25 \\Lib\\idlelib' ,
'C:\\WINDOWS\\s ystem32\\python 25.zip',
'C:\\Program Files\\Python25 \\DLLs',
'C:\\Program Files\\Python25 \\lib',
'C:\\Program Files\\Python25 \\lib\\plat-win',
'C:\\Program Files\\Python25 \\lib\\lib-tk',
'C:\\Program Files\\Python25 ',
'C:\\Program Files\\Python25 \\lib\\site-packages']
(By the way, how did that AutoHotkey folder got there? Can I remove it
from sys.path?)
After my second failure, I went to the registry
HKEY_LOCAL_MACH INE\SOFTWARE\Py thon\PythonCore \2.5\PythonPath
and added my folder there. Still nothing on sys.path , and my imports fail.
Any suggestions for adding my path to sys.path permanently? I'm
running out of ideas
Thanks,
Sergio
I'm trying to add a personal folder to the path used by python in
searching for packages and modules. This folder, "C:\docs\ut ils" , has
some packages not yet ready for "site-packages".
First, I tried sys.path.append ("C:\docs\utils ") BUT this only lasts
for the current python session.
Then, I read about PYTHONPATH and went to Control Panel - System -
Advanced - Enviromental Variables, and created a new variable
(PYTHONPATH) containing the folder. However, sys.path does not detects
it.. keeps printing the same old files:
>>import sys; import pprint; pprint.pprint(s ys.path)
'C:\\Program Files\\Python25 \\Lib\\idlelib' ,
'C:\\WINDOWS\\s ystem32\\python 25.zip',
'C:\\Program Files\\Python25 \\DLLs',
'C:\\Program Files\\Python25 \\lib',
'C:\\Program Files\\Python25 \\lib\\plat-win',
'C:\\Program Files\\Python25 \\lib\\lib-tk',
'C:\\Program Files\\Python25 ',
'C:\\Program Files\\Python25 \\lib\\site-packages']
(By the way, how did that AutoHotkey folder got there? Can I remove it
from sys.path?)
After my second failure, I went to the registry
HKEY_LOCAL_MACH INE\SOFTWARE\Py thon\PythonCore \2.5\PythonPath
and added my folder there. Still nothing on sys.path , and my imports fail.
Any suggestions for adding my path to sys.path permanently? I'm
running out of ideas
Thanks,
Sergio
Comment