saving interpreter source?

Daniel 'Dang' Griffith noemail at noemail4u.com
Mon Apr 26 08:03:23 EDT 2004


On Wed, 21 Apr 2004 10:36:48 -0600, Garett <asdf at asdf.asdf> wrote:

>Hello, I would like to be able to save source typed into the interpreter
>to a file. Kind of like marshal, but I would like to have the file contain
>the source so I can edit it later. Something like inspect.getsource() but
>for source typed into the interpreter, not imported from a module. Is this
>possible? Any ideas are greatly appreciated. -Garett

Look into IPython.  It's "An enhanced Interactive Python shell", and
includes a "save" command, where you can even specify which lines you
want saved.  http://ipython.scipy.org/
    --dang



More information about the Python-list mailing list