def imports_in_module(module):
    "\n    Get a list of strings showing what is imported in a module.\n\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 objects (modules, functions, variables, classes...)\n\n    Note: Requires having snakefood installed:\n    http://furius.ca/snakefood/doc/snakefood-doc.html#installation\n\n    You may want to use ``imports_in_py_content(py_content)`` on the actual string content itself.\n\n    # >>> print('\\n'.join(imports_in_module(__file__)))  # doctest: +SKIP\n    # StringIO.StringIO\n    # collections.Counter\n    # inspect\n    # numpy.unique\n    # os\n    # pandas\n    # re\n    # subprocess\n    # ut.pfile.iter.get_filepath_iterator\n    # ut.util.code.packages.get_module_name\n    # ut.util.code.packages.read_requirements\n    "
    if (not isinstance(module, str)):
        module = inspect.getfile(module)
        if module.endswith('c'):
            module = module[:(- 1)]
    t = subprocess.check_output(['sfood-imports', '-u', module])
    return [x for x in t.split('\n') if (len(x) > 0)]
Get a list of strings showing what is 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 objects (modules, functions, variables, classes...)

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

You may want to use ``imports_in_py_content(py_content)`` on the actual string content itself.

# >>> print('\n'.join(imports_in_module(__file__)))  # doctest: +SKIP
# StringIO.StringIO
# collections.Counter
# inspect
# numpy.unique
# os
# pandas
# re
# subprocess
# ut.pfile.iter.get_filepath_iterator
# ut.util.code.packages.get_module_name
# ut.util.code.packages.read_requirements
def imports_in_module(module):
    "\n    Get a list of strings showing what is imported in a module.\n\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 objects (modules, functions, variables, classes...)\n\n    Note: Requires having snakefood installed:\n    http://furius.ca/snakefood/doc/snakefood-doc.html#installation\n\n    You may want to use ``imports_in_py_content(py_content)`` on the actual string content itself.\n\n    # >>> print('\\n'.join(imports_in_module(__file__)))  # doctest: +SKIP\n    # StringIO.StringIO\n    # collections.Counter\n    # inspect\n    # numpy.unique\n    # os\n    # pandas\n    # re\n    # subprocess\n    # ut.pfile.iter.get_filepath_iterator\n    # ut.util.code.packages.get_module_name\n    # ut.util.code.packages.read_requirements\n    "
    if (not isinstance(module, str)):
        module = inspect.getfile(module)
        if module.endswith('c'):
            module = module[:(- 1)]
    t = subprocess.check_output(['sfood-imports', '-u', module])
    return [x for x in t.split('\n') if (len(x) > 0)]