Show More
@@ -123,6 +123,22 b' class Tracer(object):' | |||||
123 |
|
123 | |||
124 | if colors is None: |
|
124 | if colors is None: | |
125 | colors = def_colors |
|
125 | colors = def_colors | |
|
126 | ||||
|
127 | # The stdlib debugger internally uses a modified repr from the `repr` | |||
|
128 | # module, that limits the length of printed strings to a hardcoded | |||
|
129 | # limit of 30 characters. That much trimming is too aggressive, let's | |||
|
130 | # at least raise that limit to 80 chars, which should be enough for | |||
|
131 | # most interactive uses. | |||
|
132 | try: | |||
|
133 | from repr import aRepr | |||
|
134 | aRepr.maxstring = 80 | |||
|
135 | except: | |||
|
136 | # This is only a user-facing convenience, so any error we encounter | |||
|
137 | # here can be warned about but can be otherwise ignored. These | |||
|
138 | # printouts will tell us about problems if this API changes | |||
|
139 | import traceback | |||
|
140 | traceback.print_exc() | |||
|
141 | ||||
126 | self.debugger = Pdb(colors) |
|
142 | self.debugger = Pdb(colors) | |
127 |
|
143 | |||
128 | def __call__(self): |
|
144 | def __call__(self): |
General Comments 0
You need to be logged in to leave comments.
Login now