MCPcopy Create free account
hub / github.com/ActiveState/code / autocomplete

Function autocomplete

recipes/Python/578098_Pythinterpreter/recipe-578098.py:17–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15if not hasattr(__name__, "__file__"): # interpreter mode
16
17 def autocomplete():
18 import atexit
19 import os
20 import readline
21 import rlcompleter
22
23 def save_history():
24 readline.set_history_length(10000)
25 readline.write_history_file(history_path)
26
27 history_path = os.path.expanduser("~/.pyhistory")
28 if os.path.exists(history_path):
29 readline.read_history_file(history_path)
30 atexit.register(save_history)
31 readline.parse_and_bind('tab: complete')
32
33 autocomplete()
34

Callers 2

declaredDependenciesMethod · 0.85
recipe-578098.pyFile · 0.85

Calls 2

existsMethod · 0.45
registerMethod · 0.45

Tested by

no test coverage detected