[Python-Dev] import problems (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Thu Nov 27 17:14:57 CET 2008
- Previous message: [Python-Dev] __import__ problems
- Next message: [Python-Dev] __import__ problems
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mart Somermaa wrote:
There at least two workarounds: * the getattr approach documented in [3]
I can't comment on the rest, but the getattr seems overly complicated. If you need just the module, what's wrong with:
import(modname) modobj = sys.modules[modname]
- Previous message: [Python-Dev] __import__ problems
- Next message: [Python-Dev] __import__ problems
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]