]> granicus.if.org Git - python/commitdiff
Merge Py Idle changes:
authorKurt B. Kaiser <kbk@shore.net>
Wed, 18 Sep 2002 03:05:19 +0000 (03:05 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Wed, 18 Sep 2002 03:05:19 +0000 (03:05 +0000)
Rev 1.11 GvR
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.

Rev 1.12 rhettinger
(skip, done differently in Idlefork)

Rev 1.13 time_one
(skip, NA)

Lib/idlelib/ScriptBinding.py

index cc265101a5a7de348d3ea10c61a30df4ff5f2f7e..c24bf81204e62cc2a9ca9072b9bd403b0ec82b8b 100644 (file)
@@ -65,10 +65,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))