"Jia Lu" <Roka100 at gmail.com> writes:
> Hi all:
>> I try to do things below:
>>>>import sys
>>>> for i in sys.modules.keys():
> import i
> Traceback (most recent call last):
> File "<pyshell#67>", line 2, in <module>
> import i
> ImportError: No module named i
>> But it seems that import donot know what is i ? why?
Try using __import__(i) instead.
--
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk | Visit us at: http://www.gmta.info