Collecting Python's responses.

Fernando Perez fperez528 at
Wed Jun 23 07:04:33 CEST 2004

Jacek Generowicz wrote:

> I'm looking for ways of creating annotated records of Python
> interactive sessions, for documentation purposes. For example,
> something like
>    # dir shows the contents of the namespace
>    >>> dir()
>    ['__builtins__', '__doc__', '__name__']
>    # Addition works too
>    >>> 1+2
>    3
> However, I would like to automate the incorporation of Python's actual
> output, so I would like to run a program which looks something like
> this:


This could be an easy addition to ipython (  It
already has all the display hooks in place, and in fact the output handler is



More information about the Python-list mailing list