saving interpreter source?

Peter Hansen peter at engcorp.com
Wed Apr 21 12:49:11 EDT 2004


Garett 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

Last time I used it, Chris Gonnerman's readline replacement kept a
history by default:

http://newcenturycomputers.net/projects/readline.html

-Peter



More information about the Python-list mailing list