MCPcopy Index your code
hub / github.com/python/cpython / gethistoryfile

Function gethistoryfile

Lib/site.py:472–482  ·  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

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

Callers 5

doMethod · 0.90
read_history_fileMethod · 0.90
write_history_fileMethod · 0.90
append_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

Used in the wild real call sites across dependent graphs

searching dependent graphs…