Cannot import a module from a variable

Jia Lu Roka100 at gmail.com
Sun Oct 15 09:48:49 EDT 2006


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?

Thanks/




More information about the Python-list mailing list