how to change sys.path?

Ju Hui phpbird at gmail.com
Thu May 25 03:00:08 CEST 2006


yes, we can add path to PYTHONPATH,but how to remove some items?
my sys.path:
>>> import sys
>>> for x in sys.path:
...     print x
...

D:\usr\local\lib\site-packages\setuptools-0.6a11-py2.4.egg
D:\usr\local\lib\site-packages\clientcookie-1.3.0-py2.4.egg
c:\temp
C:\WINDOWS\system32\python24.zip
C:\Documents and Settings\phpbird
D:\usr\local\DLLs
D:\usr\local\lib
D:\usr\local\lib\plat-win
D:\usr\local\lib\lib-tk
D:\usr\local
D:\usr\local\lib\site-packages
>>>

the value of
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\PythonPath
D:\usr\local\Lib;D:\usr\local\DLLs;D:\usr\local\Lib\lib-tk;

the content are difference, how to remove
C:\WINDOWS\system32\python24.zip
or
D:\usr\local\lib\site-packages\clientcookie-1.3.0-py2.4.egg
?

thanks.




More information about the Python-list mailing list