Using the imp module

Claus Tondering claus.tondering at
Tue Oct 10 16:20:31 CEST 2006

Fredrik Lundh wrote:
>     globals().update(vars(__import__("xyzzy")))

Thank you, I can use that in some cases. However, I need to import a
file that is not in the load path. The imp module allows me to specify
a path name; but as far as I know, the __import__ function does not
allow me to do that.

Claus Tondering

More information about the Python-list mailing list