Python equivalent of script(1)

Thomas Rast at
Sat Jan 1 14:39:50 EST 2005

cepl at writes:

> I would love to have a record of all what I've done, so I can edit
> this record into final script.

You can save the current input history with

>>> import readline
>>> readline.write_history_file("python.log")

If you want to log your whole session, including output, try using the
'screen' utility.

- Thomas

If you want to reply by mail, substitute my first and last name for
'foo' and 'bar', respectively, and remove '.invalid'.

More information about the Python-list mailing list