xonsh.completers.imports
Import statement completions.
Contains modified code from the IPython project (at core/completerlib.py).
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
-
xonsh.completers.imports.complete_import(context: CompletionContext)[source]
Completes module names and objects for “import …” and “from … import
…”.
-
xonsh.completers.imports.complete_module(prefix)[source]
-
xonsh.completers.imports.filter_completions(prefix, completions)[source]
-
xonsh.completers.imports.get_root_modules()[source]
Returns a list containing the names of all the modules available in the
folders of the pythonpath.
-
xonsh.completers.imports.is_importable(module, attr, only_modules)[source]
-
xonsh.completers.imports.is_possible_submodule(module, attr)[source]
-
xonsh.completers.imports.module_list(path)[source]
Return the list containing the names of the modules available in the given
folder.
-
xonsh.completers.imports.try_import(mod: str, only_modules=False) → list[str][source]
Try to import given module and return list of potential completions.