[Python-checkins] r87527 - in python/branches/py3k: Lib/tkinter/scrolledtext.py Misc/NEWS

georg.brandl python-checkins at python.org
Tue Dec 28 11:56:20 CET 2010


Author: georg.brandl
Date: Tue Dec 28 11:56:20 2010
New Revision: 87527

Log:
#10768: fix ScrolledText widget construction, and make the example work from the interactive shell.

Modified:
   python/branches/py3k/Lib/tkinter/scrolledtext.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Lib/tkinter/scrolledtext.py
==============================================================================
--- python/branches/py3k/Lib/tkinter/scrolledtext.py	(original)
+++ python/branches/py3k/Lib/tkinter/scrolledtext.py	Tue Dec 28 11:56:20 2010
@@ -30,8 +30,8 @@
         # Copy geometry methods of self.frame without overriding Text
         # methods -- hack!
         text_meths = vars(Text).keys()
-        methods = vars(Pack).keys() + vars(Grid).keys() + vars(Place).keys()
-        methods = set(methods).difference(text_meths)
+        methods = vars(Pack).keys() | vars(Grid).keys() | vars(Place).keys()
+        methods = methods.difference(text_meths)
 
         for m in methods:
             if m[0] != '_' and m != 'config' and m != 'configure':
@@ -42,11 +42,10 @@
 
 
 def example():
-    import __main__
     from tkinter.constants import END
 
     stext = ScrolledText(bg='white', height=10)
-    stext.insert(END, __main__.__doc__)
+    stext.insert(END, __doc__)
     stext.pack(fill=BOTH, side=LEFT, expand=True)
     stext.focus_set()
     stext.mainloop()

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Tue Dec 28 11:56:20 2010
@@ -18,6 +18,8 @@
 Library
 -------
 
+- Issue #10768: Make the Tkinter ScrolledText widget work again.
+
 - Issue #10777: Fix "dictionary changed size during iteration" bug in
   ElementTree register_namespace().
 


More information about the Python-checkins mailing list