MCPcopy Create free account
hub / github.com/ipython/ipython / module_completer

Function module_completer

IPython/core/completerlib.py:247–256  ·  view source on GitHub ↗

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

(self,event)

Source from the content-addressed store, hash-verified

245# completers
246
247def module_completer(self,event):
248 """Give completions after user has typed 'import ...' or 'from ...'"""
249
250 # This works in all versions of python. While 2.5 has
251 # pkgutil.walk_packages(), that particular routine is fairly dangerous,
252 # since it imports *EVERYTHING* on sys.path. That is: a) very slow b) full
253 # of possibly problematic side effects.
254 # This search the folders in the sys.path for available modules.
255
256 return module_completion(event.line)
257
258# FIXME: there's a lot of logic common to the run, cd and builtin file
259# completers, that is currently reimplemented in each.

Callers

nothing calls this directly

Calls 1

module_completionFunction · 0.85

Tested by

no test coverage detected