[IPython-user] Colorizing lines in debuggers and post-mortem

R. Bernstein rocky@panix....
Thu Mar 22 01:59:36 CDT 2007


I've been out of town the last week or so and will be out another week
or so. 

I'll look at this when I get back and have a chance. A guess is that
leading indentation should be respected. When you don't have total
context of the program one can't make assumptions about what the
indentation should be. But it's just a guess, without having looked at
the code (and not having the time to do so right now).

Fernando Perez writes:
 > On 3/18/07, Fernando Perez <fperez.net@gmail.com> wrote:
 > 
 > > Please beat on this a little if you can, in case I missed something.
 > >
 > > The functionality is very nice :)
 > 
 > Rocky, it would be great if you could have a look at this.  I just
 > found your code has a problem.  This is one particular frame in some
 > of my code, from an actual traceback:
 > 
 > /home/fperez/usr/lib/python2.4/site-packages/mwadap/Operator2.py in
 > _apply_boundary_2d(self, core, bound, in_coefs, row_key, idx)
 >    3077 boundary   = self.zero_block()
 >    3078 for m in idx:
 > -> 3079 core_m   = core[m]
 >    3080 boun_m   = bound[m]
 >    3081 c_r0     = core_m[r0]
 > 
 > As you can see, the code below the for loop is mis-indented.  The
 > left-most whitespace got swallowed away.
 > 
 > If you have a chance to fix this, please send a patch my way and I'll
 > put it in right away.  I /really/ like this new, fully highlighted
 > traceback/debugger, but we need to fix this particular problem.  I
 > won't be able to look into it for several days, so it would be great
 > if you can have a go at it.
 > 
 > Cheers,
 > 
 > f
 > 


More information about the IPython-user mailing list