From: Martin v. Löwis Date: Sun, 22 Aug 2004 16:13:26 +0000 (+0000) Subject: Patch #997284: Allow pydoc to work with XP Themes (.manifest file) X-Git-Tag: v2.4a3~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e09bd93685d59fc115d2cfdbe29d6857161c7e2a;p=python Patch #997284: Allow pydoc to work with XP Themes (.manifest file) Will backport to 2.3. --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index c6a84db110..433bd281d7 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -2124,8 +2124,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