> for f in os.listdir(os.path.abspath(libdir)):
>     module_name = f.strip('.py')
>     import module_name
>
> Obviously, this throws:
>
> ImportError: No module named module_name
>
> Is there some way to do this?

have a look at help(__import__) to import a module whose name is given 
as a string.

- harold -

--
Tages Arbeit, abends Gäste,
saure Wochen, frohe Feste!
-- Johann Wolfgang v. Goethe

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to