Load Arbitrary Script as Module?

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Tue May 9 12:07:40 EDT 2000


rgb122 at my-deja.com wrote in comp.lang.python:
> Is there a way to load a module given a full filepath? Something like:
> 
> driver = LoadModule("C:\\Stuff\\sample.py")
> driver.someFunction()

driver = __import__("C:\\Stuff\\sample")

-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
  Murphy's Rules, "I sense... golden arches":
   In Original D&D, some swords had the ability to 'detect meal and what
   kind.'



More information about the Python-list mailing list