Dump Python Interactive Session to a File APRIL 6, 2007 import readline readline.write_history_file('my_history.py')