Importing different versions of a module
fredrik at pythonware.com
Tue Jul 22 19:21:00 CEST 2008
mercado mercado wrote:
> It seems that you can specify the name of the module to be imported at
> runtime using the following syntax:
> X = __import__('X')
> (from http://effbot.org/zone/import-confusion.htm)
> Of course, I would rather specify the path to the module at runtime, not
> the module name itself, but at least this is a start...
additional approaches can be found here:
also see my other reply to you in this thread.
More information about the Python-list