How can I (pythonically) check if a parameter is a Python module? There\'s no type like module or package.
>>> os
A mix of @Greg Hewgill and @Lennart Regebro answers:
>>> from types import ModuleType >>> import os >>> type(os) is ModuleType True