preserve history in the interactive python

Nikhil mnikhil at gmail.com
Tue May 20 14:14:56 EDT 2008


Nikhil wrote:
> Hi,
> 
> I am using python -i, and I find it hard typing/pasting the commands 
> from the previous interactive shell. Basically, is there anyway that I 
> can preserve the history in the shell?
> I guess but not sure there should be something like ~/.pyrc for 
> configuring such but can someone please let me know what is the 
> effective environment variable to preserve the history?
> 
> Thanks,
> Nikhil
 >>there should be something like ~/.pyrc
please read it as something in a file pointed by PYTHONSTARTUP 
environment variable. I am mostly here interested in saving the python 
shell's history automatically.

Nikhil



More information about the Python-list mailing list