15 lines
339 B
Plaintext
15 lines
339 B
Plaintext
import os
|
|
import atexit
|
|
import readline
|
|
|
|
histfile = os.path.join(os.environ['HOME'], "mm/Python/Pythonrc", '.python_history')
|
|
|
|
try:
|
|
readline.read_history_file(histfile)
|
|
except IOError:
|
|
print('I/O Error while reading history file "' + histfile + '"')
|
|
|
|
atexit.register(readline.write_history_file, histfile)
|
|
|
|
del os, histfile, readline
|