Newbie question.. how to load modules with a dynamic name?
Ron Scinta
nb0klun71q5001 at sneakemail.com
Fri Feb 23 15:40:05 EST 2001
> > This does not work alas....
> > >>> mymod = "ptw"
>
> >>> exec('import ' + mymod)
>
> ds
OK, but how then do I reference the dynamic module by name?
mymod. (The period does not help here, still thinks I am using the string
class instead of my imported module)....
Is there a way to alias the module name at this point?
More information about the Python-list
mailing list