#! /bin/python

import atexit
import os
import readline

datadir = os.environ["XDG_DATA_HOME"]
histfile = os.path.join(datadir, "python", "history.log")
try:
    readline.read_history_file(histfile)
    # default history len is -1 (infinite), which may grow unruly
    readline.set_history_length(1000)
except FileNotFoundError:
    pass

atexit.register(readline.write_history_file, histfile)

464e40f0020632622d391eae1211932e84c5ecc7
<mask token>

<mask token>
try:
    readline.read_history_file(histfile)
    readline.set_history_length(1000)
except FileNotFoundError:
    pass
atexit.register(readline.write_history_file, histfile)

<mask token>
datadir = os.environ['XDG_DATA_HOME']
histfile = os.path.join(datadir, 'python', 'history.log')
try:
    readline.read_history_file(histfile)
    readline.set_history_length(1000)
except FileNotFoundError:
    pass
atexit.register(readline.write_history_file, histfile)

import atexit
import os
import readline
datadir = os.environ['XDG_DATA_HOME']
histfile = os.path.join(datadir, 'python', 'history.log')
try:
    readline.read_history_file(histfile)
    readline.set_history_length(1000)
except FileNotFoundError:
    pass
atexit.register(readline.write_history_file, histfile)

#! /bin/python

import atexit
import os
import readline

datadir = os.environ["XDG_DATA_HOME"]
histfile = os.path.join(datadir, "python", "history.log")
try:
    readline.read_history_file(histfile)
    # default history len is -1 (infinite), which may grow unruly
    readline.set_history_length(1000)
except FileNotFoundError:
    pass

atexit.register(readline.write_history_file, histfile)
