interactive python session spool/save-log command?

Discussion in 'Python' started by S. M. Tuttle, Jul 21, 2005.

  1. S. M. Tuttle

    S. M. Tuttle Guest

    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
     
    S. M. Tuttle, Jul 21, 2005
    #1
    1. Advertising

  2. S. M. Tuttle

    Robert Kern Guest

    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


    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter
     
    Robert Kern, Jul 21, 2005
    #2
    1. Advertising

  3. 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
     
    Brian van den Broek, Jul 21, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. popo
    Replies:
    4
    Views:
    455
  2. Allan
    Replies:
    1
    Views:
    1,387
    Thomas Matthews
    Feb 16, 2004
  3. Fredrik Normann

    Reading files in /var/spool/rwho/whod.*

    Fredrik Normann, Jun 27, 2005, in forum: Python
    Replies:
    3
    Views:
    380
    Fredrik Normann
    Jun 30, 2005
  4. Consulente EDP

    MONITOR SPOOL USER Version 1.0

    Consulente EDP, Nov 6, 2008, in forum: Java
    Replies:
    2
    Views:
    383
    Harold Yarmouth
    Nov 7, 2008
  5. semaphore
    Replies:
    0
    Views:
    703
    semaphore
    Feb 26, 2009
Loading...

Share This Page