Import a lot of modules, or, import 'foo'

David N. Welton dwelton at linuxcare.com
Fri Jul 30 20:52:32 EDT 1999


So, basically, I'd like to do this:

 tests = ['fs', 'swap']

 for t in tests:
     import t

 do more stuff on what promises to be a lot of modules

I've looked around a bit, but can't find what I need.  Maybe I'm just
going about this the wrong way, but... Hmm, now I want to know how to
do this in any case:-)

Thanks,
-- 
David N. Welton, Web Engineer, Linuxcare, Inc.
415.354.4878 x241 tel, 415.701.7457 fax
dwelton at linuxcare.com, http://www.linuxcare.com/
Linuxcare. At the center of Linux.




More information about the Python-list mailing list