On Mar 22, 10:07 am, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 22, 7:19 pm, [EMAIL PROTECTED] wrote: > > > > > On the other hand, are you willing to make changes to the console? > > How big and what? I was thinking of __ to keep the second-to-last > > most recent command. > > Access to and editing of previous input lines is already provided by > the cooked mode of the console (e.g. on Windows, lean on the up-arrow > key) or can be obtained by installing the readline package. Perhaps by > analogy with _, you mean the *result* of the penultimate *expression*. > This functionality would be provided by the Python interactive > interpreter but it's not ... do have a look at IPython (http:// > ipython.scipy.org/moin/About); I don't use it but I get the impression > that if it doesn't already keep a stack or queue of recent results, > you could implement it yourself easily.
As you guessed, __ and ___ have the expected meaning in IPython. moreover the nth output in the session is stored in _n. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list