module importing and variable syntax

Fredrik Lundh fredrik at pythonware.com
Tue Mar 13 05:29:02 EST 2001


Jeff Davis wrote:
> What I am trying to do is have an arbitrary string with an arbitrary
> type (type with respect to my program, not python) access the function
> associated with the string in the module associated with the type.

look for __import__ and getattr under built-in functions
in the library reference.

Cheers /F





More information about the Python-list mailing list