From: Guido van Rossum Date: Tue, 7 Aug 2001 17:15:36 +0000 (+0000) Subject: Fix for SF bug #448835. X-Git-Tag: v2.2a3~772 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44b1e7d8403558e945f796fec897d7862c9cec8a;p=python 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. --- diff --git a/Tools/idle/ScriptBinding.py b/Tools/idle/ScriptBinding.py index b54dfc4c79..4071681b7f 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))