A convenient feature of most Unix terminals is the fact that you can hit the up and down arrow keys to scroll through your command history to repeat old commands.
This feature also exists in the Python shell when run from the Unix terminal.
My problem is that if I'm debugging a Python program, I'll typically start from Unix and type
python and then
from mypython import *, then I'll start running and checking my functions. If I end up with an error at any point and I need to make modifications to the file, I have to
exit() python and reenter in order to issue a new import command that uses the modified file. Usually I have typed several long and complicated commands that I would like to repeat so it would be great if the command history were maintained between sessions.
So I want to know if there is a way to merge the command history between Unix and Python, or alternatively a way to retain command history between Python sessions.