[Tutor] Output not legible when debugging with ipdb

Walter Prins wprins at gmail.com
Tue Nov 26 17:50:41 CET 2013


Hi,


On 26 November 2013 14:22, Peter Zorn <mail at peterzorn.de> wrote:

>   Hi everyone -
>
>  I'm fairly new to Python and I'm working through this (
> http://quant-econ.net/) tutorial to learn the language.
>
>  I've encountered a problem with the ipdb debugger and I
> wonder if anyone can help. When I run this code
> ( http://quant-econ.net/ipython.html#setting-a-break-point)
> and include the "import ipdb; ipdb.set_trace()" command line, the ipdb
> debugger starts but its output is not legible (see debugging1.pdf in
> attach). In addition, after I ran the code, the layout of any other
> terminal output is also changed (see debugging2.pdf).
>
> I'm running Python(x,y) on Windows 7 64-bit in the Windows Powershell,
> but I've had the same problem with the Anaconda distribution of Python.
>
>
All those arrows and codes you see are called "ANSI escape codes" or "ANSI
control codes".  It's a way to control/signal text colour and formatting
inline for text terminals.  I don't know whether or not it does, but if
Windows Powershell does not support ANSI escape codes then I'd expect the
above style of output, so either it doesn't support it, or it does but
isn't enabled.

You might prefer and I'd suggest you use a terminal program that does
support ANSI escape codes, such as ConEmu or Console2:
http://sourceforge.net/projects/console<http://sourceforge.net/projects/console/?source=navbar>
https://code.google.com/p/conemu-maximus5/

(Personally I use ConEmu with IPython as my system shell as well as Python
REPL.)

Cheers,

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131126/5e6c0e11/attachment.html>


More information about the Tutor mailing list