Message289342
$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 |
|
Date |
User |
Action |
Args |
2017-03-10 08:10:24 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, 0xl3vi |
2017-03-10 08:10:24 | serhiy.storchaka | set | messageid: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> |
2017-03-10 08:10:24 | serhiy.storchaka | link | issue29779 messages |
2017-03-10 08:10:24 | serhiy.storchaka | create | |
|