interactive python session spool/save-log command?

S

S. M. Tuttle

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
 
R

Robert Kern

S. M. Tuttle said:
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.

IPython is an interactive interpreter that will log all input to a file.

http://ipython.scipy.org/

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
B

Brian van den Broek

Robert Kern said unto the world upon 2005-07-20 21:15:
IPython is an interactive interpreter that will log all input to a file.

http://ipython.scipy.org/

If your students are more likely to feel comfortable with an interface
with things right there for the clicking, IDLE allows for the
interactive prompt windows to be saved. IDLE's bundled with Python, so
less to install to boot.

Best,

Brian vdB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top