Python equivalent of script(1)

cepl at cepl at
Sat Jan 1 20:33:02 CET 2005

Is there anything like script(1) for python interactive sessions. From
script(1) manpage:

Script makes a typescript of everything printed on your terminal.
It is useful for students who need a hardcopy record of an
interactive session as proof of an assignment, as the typescript
file can be printed out later with lpr(1).

If the argument file is given, script saves all dialogue in file.
If no file name is given, the typescript is saved in the file

In my case I wouldn't like to use it as a proof of anything, but I want
to get a script accessing a library system in my school -- it means
many attempts to play with urllib. I would prefer to do it in an
interactive session, but then I would love to have a record of all what
I've done, so I can edit this record into final script.
Thanks for any hint,

Matej Cepl

More information about the Python-list mailing list