Message 289342 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
$HISTFILE is the name of the file in which Bash command history is saved. Shouldn't the name of similar environment variable for Python be PYTHONHISTFILE?

Bash uses several environment variables for control its command history: HISTCONTROL, HISTFILE, HISTFILESIZE, HISTIGNORE, HISTSIZE, HISTTIMEFORMAT. Does Python need corresponding environment variables?

Wouldn't be better to control all these details by Python code in .pythonrc.py rather than by environment variables? For example I have the following code in my .pythonrc.py:

if sys.version_info < (3,):
    try:
        import readline, os, atexit
        histfile = os.path.join(os.path.expanduser("~"), ".python2_history")
        try:
            readline.read_history_file(histfile)
        except IOError:
            pass
        atexit.register(readline.write_history_file, histfile)
        del os, histfile
    except ImportError:
        pass