doing non-prespecified imports

Egbert Bouwman egbert.list at hccnet.nl
Sat Jul 31 10:38:46 CEST 2004


On Sat, Jul 31, 2004 at 08:32:14AM +0800, Jon Perez wrote:
> Is it possible to do:
> 
> import xxxx
> 
> within code where xxxx is specified by
> a string or user input?
> 
> 
> I need this in order to be able to load different,
> arbitrary modules under application-user control.
> 
See the built-in function __import__()
egbert
-- 
Egbert Bouwman - Keizersgracht 197 II - 1016 DS  Amsterdam - 020 6257991
========================================================================



More information about the Python-list mailing list