On 6 Mar 2005 21:34:08 -0800, Steven Reddie <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I want to do something like the following, which doesn't work:
> 
>     modulename = 'module'
>     import modulename
> 
> The error is that there is no module named 'modulename'.  Is there a
> way to get that variable expanded?
> 

modulename = 'module'
module = __import__(modulename)


Hye-Shik
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to