Commit 1956352b authored by Guido van Rossum's avatar Guido van Rossum

Clear the linecache before printing a traceback

parent 49c1a7eb
......@@ -129,7 +129,14 @@ class ModifiedInterpreter(InteractiveInterpreter):
# Extend base class method to reset output properly
text = self.tkconsole.text
self.tkconsole.resetoutput()
self.checklinecache()
InteractiveInterpreter.showtraceback(self)
def checklinecache(self):
c = linecache.cache
for key in c.keys():
if key[:1] + key[-1:] != "<>":
del c[key]
def runcode(self, code):
# Override base class method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment