Tuesday, September 29, 2009

python: How to add a directory to the module search path

It's easy to add a directory to the module search path. (Note: I like running stuff and testing new things in the interpreter. This tidbit enables me to test out modules I'm writing without having to modify the PYTHONPATH environment variable. The python interpreter rocks.)


import sys
sys.path.append( 'newpath' )

1 comment:

Anonymous said...

I еnjoy what you guys are usually up too. This type of cllever
work and exposure! Keep up tthe great works gjys I've included you ǥuys tο our blogroll.



Feel free to visit my blog ... tv android numericable