recall function definition from shell

René 'Necoro' Neumann lists at necoro.eu
Tue May 18 15:21:18 EDT 2010


Am 18.05.2010 20:55, schrieb superpollo:
> 
> yes python does not, but maybe the *shell* does, or so i thought. i just
> wanted to dump the code for the function in a file, after i tested in
> the shell...

You might want to have a look at the IPython shell [1]. I personally do
not use it myself, but I thought to remember that it had some feature
like this (perhaps not dump _one function_, but all the input, which you
then only need to cleanup).

A quick glance revealed f.ex. the history and edit functionality [2] --
a bit more digging might really show up the thing you are looking for.

- René

[1] http://ipython.scipy.org/
[2]
http://ipython.scipy.org/doc/manual/html/interactive/tutorial.html#source-code-handling-tips


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100518/0050aa60/attachment.sig>


More information about the Python-list mailing list