Thursday, April 3, 2008

Where are the Python modules in this computer?

Start you python command prompt, and type:
>>import sys
>>sys.path
( it will print out a list of directories)

Another way is write a python script that prints the list out a little prettier:

#!/usr/bin/env python
import sys

for x in sys.path:
        print x
# add to the list of paths with this:
a="/Users/lance/bin/"
sys.path.append(a)

1 comment:

Unknown said...

Thanks for this info, I was looking for xml.sax needed to run dev_appserver.py, and this will be a great help.

Cheers,

David Webb: Nature Pictures & Tech Stuff (tech stuff out of date, sorry!)