Re: Importing module with name given as a variable
- From: Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Aug 2008 19:18:04 +0200
Sean Davis a écrit :
What is the "best practice" for importing an arbitrary module given
that the name is stored in a variable? The context is a simple web
application with URL dispatching to a module and function. I know of
__import__(), the imp module, and exec. For each of these, is there a
way to make them work "just like" the normal import call?
IIRC, this is documented in the __import__ function's doc.
.
- Prev by Date: Re: Advice on the style to use in imports
- Next by Date: wholesale Christian Audigier t-shirts ( WWW.SNEAKERS-IN-CHINA )
- Previous by thread: (www.sneakers-in-china.com) Wholesale Air Jordan 6 Fusion
- Next by thread: Re: Importing module with name given as a variable
- Index(es):