Le 05/07/2011 15:44, Eric Snow a écrit :
On Tue, Jul 5, 2011 at 1:36 AM, Stéphane Klein<steph...@harobed.org> wrote:
Hi,
I would like import some module dynamically.
To import a module dynamically, you can use the built-in __import__ function:
module = __import__("js")
Even better, use importlib's import_module, which is available in
2.7/3.2. A backport is available on PyPI.
module = importlib.import_module("js")
Thanks !
It's work very well.
Regards,
Stephane
--
Stéphane Klein <steph...@harobed.org>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com
--
http://mail.python.org/mailman/listinfo/python-list