Re: preserve history in the interactive python



Nikhil <mnikhil@xxxxxxxxx> writes:

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
I figured it out. This below thing works fine for me.
BTW, I got it from http://docs.python.org/tut/node15.html. A little
search would not hurt ;-)

Or you could use IPython (http://ipython.scipy.org/), "an Enhanced
Python Shell".

--
Arnaud
.



Relevant Pages

  • Re: preserve history in the interactive python
    ... I am using python -i, and I find it hard typing/pasting the commands from the previous interactive shell. ... is there anyway that I can preserve the history in the shell? ... import readline ...
    (comp.lang.python)
  • Re: preserve history in the interactive python
    ... I am using python -i, and I find it hard typing/pasting the commands from the previous interactive shell. ... is there anyway that I can preserve the history in the shell? ...
    (comp.lang.python)
  • Re: [Tcl] Wasted return value
    ... >> Hmm, Tcl doesn't do that, but there's no reason why it couldn't be done ... >> as part of an interactive shell. ... only to make use of the [history] facilities. ...
    (comp.lang.tcl)
  • preserve history in the interactive python
    ... and I find it hard typing/pasting the commands from the previous interactive shell. ... is there anyway that I can preserve the history in the shell? ...
    (comp.lang.python)
  • Re: access history from another shell session
    ... I'm now using Linux and Solaris and their versions of ksh. ... found a way to get either of them to share their history this way. ... Everyone tells me its the best interactive shell out there; ...
    (comp.os.linux.misc)