logging should support %doctest_mode

Bug #550331 reported by quazgar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Unassigned

Bug Description

There should be a way to log input and output in a doctest compatible way, so that the log can be used (maybe in a truncated form) for the standard doctest. Currently the only way I see is to switch to %doctest_mode, perform the commands as needed (maybe from a previous log file) and copy&paste the shell content to a new file.

Proposal:
Add a new option (maybe -d) to %logstart that saves the input and output accordingly.

I have ipython 0.10, used with python 2.6.4, on a 64bit Linux.

Tags: wishlist
Revision history for this message
Fernando Perez (fdo.perez) wrote :

In trunk, '%hist -p' prints 'classic' prompts as well:

      -p: print classic '>>>' python prompts before each input. This is useful
       for making documentation, and in conjunction with -o, for producing
       doctest-ready output.

Changed in ipython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.