interactive python session spool/save-log command?

S. M. Tuttle st10 at humboldt.edu
Wed Jul 20 21:06:00 EDT 2005


I'm going to be teaching an introductory course on Python
in the Fall, so I am hurriedly trying to both learn
Python and prepare the course during the next few weeks.

I'm curious if there is a command that allows everything from
that point on in a python interactive session to be
saved/spooled/forked/logged into a text file of the user's choice.

(Like spool lets you do in Oracle splplus; like the protocol
predicate lets you do in some version of Prolog; how you can save
the Interactions window contents in DrScheme; etc.)

I'd like to have students turn in such logs at various times,
(to show that they've tried certain tests of their python code,
etc.) if it is practical...

Thanks for any pointers or assistance in this. My searches using
google, google groups, and the search engine at www.python.org
haven't been effective so far, either because this command does
not exist or because (I hope!!) the search terms I've used
just haven't been quite right.

-- Sharon Tuttle
   Arcata, CA




More information about the Python-list mailing list