Could someone provide me with a good way of importing a whole directory of modules? I have a structure like this:
/Foo bar.py spam.py eggs.py
Add the __all__ Variable to __init__.py containing:
__all__
__init__.py
__all__ = ["bar", "spam", "eggs"]
See also http://docs.python.org/tutorial/modules.html