function to do dynamic import?

Steve Holden steve at holdenweb.com
Tue Sep 11 23:14:18 EDT 2007


bambam wrote:
[...]
> def gim(self):
>     for gamel in self.gamel_list:
>         __import__(gamel['file'])
> 
> Works as hoped for. I did a web search for 'dynamic import' and
> the only examples I found used exec.
> 
> Thanks
> 
Cool. You're getting there!

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list