I need a function that will import a module (using __import__) from only one specific location on my filesystem. Name collisions are possible. To avoid this I could *temporarily* modify sys.path for the operation so that it contains only the path that I want to work from.
console example: >>> sys_path = sys.path >>> sys.path = ["/cgi-bin/libraries/python"] >>> sys.path ['/cgi-bin/libraries/python'] >>> sys.path = sys_path >>> sys.path ## original sys.path I don't want to create something that could bite me later. Documentation on sys.path that I have found does not address *removing* items from sys.path or completely changing it. Any caveats or comments on this procedure? TIA -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
