]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 22 Aug 2004 16:14:53 +0000 (16:14 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 22 Aug 2004 16:14:53 +0000 (16:14 +0000)
Lib/pydoc.py
Misc/NEWS

index 5c5102a3f5ed1cbf8772df720ad7adedbe79afbc..6a876f0c580d2161c4adc7a62f57cb1ca432e04a 100755 (executable)
@@ -2056,8 +2056,16 @@ def gui():
 
     import Tkinter
     try:
-        gui = GUI(Tkinter.Tk())
-        Tkinter.mainloop()
+        root = Tkinter.Tk()
+        # Tk will crash if pythonw.exe has an XP .manifest
+        # file and the root has is not destroyed explicitly.
+        # If the problem is ever fixed in Tk, the explicit
+        # destroy can go.
+        try:
+            gui = GUI(root)
+            root.mainloop()
+        finally:
+            root.destroy()
     except KeyboardInterrupt:
         pass
 
index 1cb3487c1c8aabf79bc3da5293faefbad6f8137d..502baa88c7571d7a5b68dfc72f3f8287e1717ef1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,6 +49,8 @@ Extension modules
 Library
 -------
 
+- Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
+
 - Patch #808719: Ignore locale's encoding in IDLE if it is an empty string.
 
 - Patch #946153: Add wait_visibility before grab_set.