Creating "virtual" module-namespace

Harald simon.12.ghum at spamgourmet.com
Thu Dec 12 02:53:23 EST 2002


Erik,

> What exactly is your objective?

I have some modules stored in strings (to be exact: in a database).

Now I want to use THIS modules in the same way as if I would import them
via 
import FileName

If I simply exec this strings in "globals"

exec <string> in globals()

all the classes & functions are in my global namespace - without a 
prefix.

That's all.

Thank you for your time

Harald



More information about the Python-list mailing list