MCPcopy Index your code
hub / github.com/ipython/ipython / module_completer

Function module_completer

IPython/core/completerlib.py:275–284  ·  view source on GitHub ↗

Give completions after user has typed 'import ...' or 'from ...

(self,event)

Source from the content-addressed store, hash-verified

273# completers
274
275def module_completer(self,event):
276 """Give completions after user has typed 'import ...' or 'from ...'"""
277
278 # This works in all versions of python. While 2.5 has
279 # pkgutil.walk_packages(), that particular routine is fairly dangerous,
280 # since it imports *EVERYTHING* on sys.path. That is: a) very slow b) full
281 # of possibly problematic side effects.
282 # This search the folders in the sys.path for available modules.
283
284 return module_completion(event.line)
285
286# FIXME: there's a lot of logic common to the run, cd and builtin file
287# completers, that is currently reimplemented in each.

Callers

nothing calls this directly

Calls 1

module_completionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…