function-class frustration

John Machin sjmachin at lexicon.net
Sat Mar 22 06:07:18 EDT 2008


On Mar 22, 7:19 pm, castiro... at gmail.com 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.



More information about the Python-list mailing list