MCPcopy Index your code
hub / github.com/RustPython/RustPython / gethistoryfile

Function gethistoryfile

Lib/site.py:475–485  ·  view source on GitHub ↗

Check if the PYTHON_HISTORY environment variable is set and define it as the .python_history file. If PYTHON_HISTORY is not set, use the default .python_history file.

()

Source from the content-addressed store, hash-verified

473
474
475def gethistoryfile():
476 """Check if the PYTHON_HISTORY environment variable is set and define
477 it as the .python_history file. If PYTHON_HISTORY is not set, use the
478 default .python_history file.
479 """
480 if not sys.flags.ignore_environment:
481 history = os.environ.get("PYTHON_HISTORY")
482 if history:
483 return history
484 return os.path.join(os.path.expanduser('~'),
485 '.python_history')
486
487
488def enablerlcompleter():

Callers 4

doMethod · 0.90
read_history_fileMethod · 0.90
write_history_fileMethod · 0.90
register_readlineFunction · 0.85

Calls 3

expanduserMethod · 0.80
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected