Python equivalent of script(1)

Mike Meyer mwm at mired.org
Sat Jan 1 15:29:26 EST 2005


cepl at surfbest.net writes:

> 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,

Emacs will do that for you, either in a shell (command shell) or in a
Python shell. Edit a python file, and type C-C ! and it'll start an
interactive python in a buffer that will save all the output.

Of course, you can also run your python after running script. That
will log everything from the python session in the script file.

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list