summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-07 17:15:36 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-07 17:15:36 (GMT)
commit44b1e7d8403558e945f796fec897d7862c9cec8a (patch)
tree60c92f5b6d81d6675770d6ebcc255987df785967
parent15d86c6297849dbacadfc07580934e3f39881057 (diff)
downloadcpython-44b1e7d8403558e945f796fec897d7862c9cec8a.zip
cpython-44b1e7d8403558e945f796fec897d7862c9cec8a.tar.gz
cpython-44b1e7d8403558e945f796fec897d7862c9cec8a.tar.bz2
Fix for SF bug #448835.
Fix this to work with the new (still undocumented) tabnanny API. I'm afraid Stephen will have to add this fix to the IDLE fork code base as well.
-rw-r--r--Tools/idle/ScriptBinding.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Tools/idle/ScriptBinding.py b/Tools/idle/ScriptBinding.py
index b54dfc4..4071681 100644
--- a/Tools/idle/ScriptBinding.py
+++ b/Tools/idle/ScriptBinding.py
@@ -69,10 +69,9 @@ class ScriptBinding:
def tabnanny(self, filename):
import tabnanny
import tokenize
- tabnanny.reset_globals()
f = open(filename, 'r')
try:
- tokenize.tokenize(f.readline, tabnanny.tokeneater)
+ tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
except tokenize.TokenError, msg:
self.errorbox("Token error",
"Token error:\n%s" % str(msg))