Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > interactive python session spool/save-log command?

Reply
Thread Tools

interactive python session spool/save-log command?

 
 
S. M. Tuttle
Guest
Posts: n/a
 
      07-21-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

 
Reply With Quote
 
 
 
 
Robert Kern
Guest
Posts: n/a
 
      07-21-2005
S. M. Tuttle wrote:
> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)

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

 
Reply With Quote
 
 
 
 
Brian van den Broek
Guest
Posts: n/a
 
      07-21-2005
Robert Kern said unto the world upon 2005-07-20 21:15:
> S. M. Tuttle wrote:
>
>>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/
>


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interactive/Non-interactive ASPX ? WJ ASP .Net 2 02-26-2005 02:54 AM
non Interactive and Interactive AAH Computer Support 0 01-09-2005 04:09 PM
Interactive and non interactive AAH Computer Support 1 01-09-2005 04:01 PM
utf-8 in interactive python session Luke Python 1 09-30-2004 07:10 AM
Re: List of declared variables in interactive Python session? vincent wehren Python 2 07-22-2003 07:07 AM



Advertisments