def base_modules_used_in_module(module):
    "\n    Get a list of strings showing what base modules that are imported in a module.\n    :param module: An actual module object the file of the module (as given by inspect.getfile(module)\n    :return: A list of strings showing the imported base modules (i.e. the X of import X.Y.Z or from X.Y import Z).\n\n    Note: Requires having snakefood installed:\n    http://furius.ca/snakefood/doc/snakefood-doc.html#installation\n\n    >>> base_modules_used_in_module(__file__)  # doctest: +SKIP\n    ['StringIO', 'collections', 'inspect', 'numpy', 'os', 'pandas', 're', 'subprocess', 'ut']\n    "
    return list(unique([re.compile('\\w+').findall(x)[0] for x in imports_in_module(module)]))
Get a list of strings showing what base modules that are imported in a module.
:param module: An actual module object the file of the module (as given by inspect.getfile(module)
:return: A list of strings showing the imported base modules (i.e. the X of import X.Y.Z or from X.Y import Z).

Note: Requires having snakefood installed:
http://furius.ca/snakefood/doc/snakefood-doc.html#installation

>>> base_modules_used_in_module(__file__)  # doctest: +SKIP
['StringIO', 'collections', 'inspect', 'numpy', 'os', 'pandas', 're', 'subprocess', 'ut']
def base_modules_used_in_module(module):
    "\n    Get a list of strings showing what base modules that are imported in a module.\n    :param module: An actual module object the file of the module (as given by inspect.getfile(module)\n    :return: A list of strings showing the imported base modules (i.e. the X of import X.Y.Z or from X.Y import Z).\n\n    Note: Requires having snakefood installed:\n    http://furius.ca/snakefood/doc/snakefood-doc.html#installation\n\n    >>> base_modules_used_in_module(__file__)  # doctest: +SKIP\n    ['StringIO', 'collections', 'inspect', 'numpy', 'os', 'pandas', 're', 'subprocess', 'ut']\n    "
    return list(unique([re.compile('\\w+').findall(x)[0] for x in imports_in_module(module)]))