Re: [Tutor] Reading module to import from a string

2008-12-16 Thread Mark Tolonen
"Shrutarshi Basu" wrote in message news:376fbdcf0812151438w53c8f3f7rc1dc481b52428...@mail.gmail.com... Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? Thanks, Basu mod = __import

Re: [Tutor] Reading module to import from a string

2008-12-15 Thread Chris Calloway
On 12/15/2008 5:38 PM, Shrutarshi Basu wrote: Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? http://docs.python.org/library/imp.html -- Sincerely, Chris Calloway http://www.secoo

Re: [Tutor] Reading module to import from a string

2008-12-15 Thread Chris Calloway
On 12/15/2008 5:38 PM, Shrutarshi Basu wrote: Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? http://stackoverflow.com/questions/67631/how-to-import-module-from-file-name -- Sincer

[Tutor] Reading module to import from a string

2008-12-15 Thread Shrutarshi Basu
Suppose I have a module that I want to import called ImMod1 that's saved in a variable like so: var = "ImMod1" Is there some way to import ImMod1 by using var? Thanks, Basu -- The ByteBaker : http://www.bytebaker.com ___ Tutor maillist - Tutor@python