Hacking the scope to pieces

Skip Montanaro skip at pobox.com
Tue May 24 10:19:07 EDT 2005


    Hugh> What I'm after is a way of moduleLoader.loadModule working back up
    Hugh> the scope and placing the imported module in the main global
    Hugh> scope. Any idea how to do this?

You want to write an import hook I think.  I'd start with the docs for the
__import__ builtin.  Also, Google for "python import hook".

Skip



More information about the Python-list mailing list