Show More
@@ -60,7 +60,7 b' You can implement other color schemes easily, the syntax is fairly' | |||
|
60 | 60 | self-explanatory. Please send back new schemes you develop to the author for |
|
61 | 61 | possible inclusion in future releases. |
|
62 | 62 | |
|
63 |
$Id: ultraTB.py 2 |
|
|
63 | $Id: ultraTB.py 2419 2007-06-01 07:31:42Z fperez $""" | |
|
64 | 64 | |
|
65 | 65 | #***************************************************************************** |
|
66 | 66 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> |
@@ -342,9 +342,9 b' class ListTB(TBTools):' | |||
|
342 | 342 | |
|
343 | 343 | Colors = self.Colors |
|
344 | 344 | list = [] |
|
345 | if type(etype) == types.ClassType: | |
|
345 | try: | |
|
346 | 346 | stype = Colors.excName + etype.__name__ + Colors.Normal |
|
347 | else: | |
|
347 | except AttributeError: | |
|
348 | 348 | stype = etype # String exceptions don't get special coloring |
|
349 | 349 | if value is None: |
|
350 | 350 | list.append( str(stype) + '\n') |
@@ -419,13 +419,17 b' class VerboseTB(TBTools):' | |||
|
419 | 419 | """Return a nice text document describing the traceback.""" |
|
420 | 420 | |
|
421 | 421 | # some locals |
|
422 | try: | |
|
423 | etype = etype.__name__ | |
|
424 | except AttributeError: | |
|
425 | pass | |
|
422 | 426 | Colors = self.Colors # just a shorthand + quicker name lookup |
|
423 | 427 | ColorsNormal = Colors.Normal # used a lot |
|
424 | 428 | col_scheme = self.color_scheme_table.active_scheme_name |
|
425 | 429 | indent = ' '*INDENT_SIZE |
|
426 | exc = '%s%s%s' % (Colors.excName, str(etype), ColorsNormal) | |
|
427 | 430 | em_normal = '%s\n%s%s' % (Colors.valEm, indent,ColorsNormal) |
|
428 | 431 | undefined = '%sundefined%s' % (Colors.em, ColorsNormal) |
|
432 | exc = '%s%s%s' % (Colors.excName,etype,ColorsNormal) | |
|
429 | 433 | |
|
430 | 434 | # some internal-use functions |
|
431 | 435 | def text_repr(value): |
@@ -459,8 +463,10 b' class VerboseTB(TBTools):' | |||
|
459 | 463 | def nullrepr(value, repr=text_repr): return '' |
|
460 | 464 | |
|
461 | 465 | # meat of the code begins |
|
462 | if type(etype) is types.ClassType: | |
|
466 | try: | |
|
463 | 467 | etype = etype.__name__ |
|
468 | except AttributeError: | |
|
469 | pass | |
|
464 | 470 | |
|
465 | 471 | if self.long_header: |
|
466 | 472 | # Header with the exception type, python version, and date |
@@ -1,3 +1,9 b'' | |||
|
1 | 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu> | |
|
2 | ||
|
3 | * IPython/ultraTB.py (VerboseTB.text): update printing of | |
|
4 | exception types for Python 2.5 (now all exceptions in the stdlib | |
|
5 | are new-style classes). | |
|
6 | ||
|
1 | 7 | 2007-05-31 Walter Doerwald <walter@livinglogic.de> |
|
2 | 8 | |
|
3 | 9 | * IPython/Extensions/igrid.py: Add new commands refresh and |
General Comments 0
You need to be logged in to leave comments.
Login now