Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: Edit the Module Search Path

Python: Edit the Module Search Path
{filelink=16859}

import sys 
print "The Path has", len(sys.path), "members"
# Add new path
sys.path.insert(0, "test")
import test
# delete the path
sys.path = []
import operator # oops!

No comments yet.

Leave a Comment