bundles / IPython 9.14.0.dev / IPython / utils / module_paths / find_mod
function
IPython.utils.module_paths:find_mod
Signature
def find_mod ( module_name : str ) → str | None | importlib.abc.Loader Summary
Find module module_name on sys.path, and return the path to module module_name.
Extended Summary
If
module_namerefers to a module directory, then return path to__init__file.If
module_nameis a directory without an __init__file, return None.
If module is missing or does not have a
.pyor.pywextension, return None.Note that we are not interested in running bytecode.
Otherwise, return the fill path of the module.
Parameters
module_name: str
Returns
module_path: strPath to module
module_name, its __init__.py, or None, depending on above conditions.
Aliases
-
IPython.utils.module_paths.find_mod