Import problem

Sindh skodela at my-deja.com
Fri Oct 20 09:16:01 EDT 2000


Hi folks

How can I import a module by giving a name of list elements.

Eg:
for n in os.listdir('.'):
	import n

but it fails. Can anyone find where I am going wrong. It says 'no module
called n'.

Thanks
sreekant

--
A man needs to sleep for 36 hours a day atleast.


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list