Turns out there is an easy way to do this and it is referenced in the python documentation (http://docs.python.org/3/tutorial/interactive.html)
Place the startup script below in a file in your home directory such as .pystartup
and export the environment variable PYTHONSTARTUP pointing to this file
import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_history(historyPath=historyPath): import readline readline.write_history_file(historyPath) if os.path.exists(historyPath): readline.read_history_file(historyPath) atexit.register(save_history) del os, atexit, readline, rlcompleter, save_history, historyPath