2 from __future__
import print_function
12 flagPtr = ctypes.cast(ctypes.pythonapi.Py_InteractiveFlag,
13 ctypes.POINTER(ctypes.c_int))
14 return flagPtr.contents.value > 0
or bool(os.environ.get(
"PYTHONINSPECT",
False))
17 if __name__ ==
'__main__':
23 historyPath = os.path.expanduser(
"~/.pyhistory")
28 readline.write_history_file(historyPath)
29 if os.path.exists(historyPath):
30 readline.read_history_file(historyPath)
33 atexit.register(save_history)
34 readline.parse_and_bind(
"set show-all-if-ambiguous on")
35 readline.parse_and_bind(
"tab: complete")
36 if os.path.exists (historyPath) :
37 readline.read_history_file(historyPath)
38 readline.set_history_length(-1)
41 print(
"python -i `which interactivePythonTest.py` ")
S & print(S &os, JobReport::InputFile const &f)
def interactive_inspect_mode()
def save_history(historyPath=historyPath)
Load and save command line history when ## running interactively.