import readline
readline.write_history_file('my_history.py')

Leave a Reply