modulegraph.util — Utilies functions — modulegraph 0.12.1 documentation

# `modulegraph.util` — Utilies functions

`modulegraph.util.` `imp_find_module`(name, path=None)

  This function has the same interface as `imp.find_module()`, but also works with dotted names.

`modulegraph.util.` `imp_walk`(name)

  yields the namepart and importer information for every part of a dotted module name, and raises `ImportError` when the name cannot be found.

  The result elements are tuples with two elements, the first is a module name, the second is the result for `imp.find_module()` for that module (taking into account PEP 302 importers)

  Deprecated since version 0.10.

`modulegraph.util.` `guess_encoding`(fp)

  Returns the encoding of a python source file.