GO AHEAD -MAKE ME LOOK DUMB- Please

Cousin Stanley CousinStanley at hotmail.com
Wed Dec 31 03:23:37 CET 2003


Under Win98 pythonpath is used as an environment variable
and its string value can be displayed from a DOS command prompt
using the echo command ....

echo %pythonpath%
K:\Python\Lib\site-packages\fixedpoint;G:\dislin\python;K:\Python\py_Work\GUI\Tk
\Grayson\Examples;K:\Python\py_Work\GUI\Tk\Grayson\Examples\Common

>From the Python interpreter, pythonpath can be checked
using the os.environ method ....
>>>
>>> import os
>>>
>>> list_pp = os.environ[ 'pythonpath' ].split( ';' )
>>>
>>> for this_path in list_pp :
...     print this_path
...
K:\Python\Lib\site-packages\fixedpoint
G:\dislin\python
K:\Python\py_Work\GUI\Tk\Grayson\Examples
K:\Python\py_Work\GUI\Tk\Grayson\Examples\Common
>>>

-- 
Cousin Stanley
Human Being
Phoenix, Arizona





More information about the Python-list mailing list