summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2004-08-22 16:13:26 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2004-08-22 16:13:26 (GMT)
commite09bd93685d59fc115d2cfdbe29d6857161c7e2a (patch)
treea85f4530312108250787566950a2e72abec1009e /Lib
parentac37f3d001020fb7b1c211ad4ddb309705551a2c (diff)
downloadcpython-e09bd93685d59fc115d2cfdbe29d6857161c7e2a.zip
cpython-e09bd93685d59fc115d2cfdbe29d6857161c7e2a.tar.gz
cpython-e09bd93685d59fc115d2cfdbe29d6857161c7e2a.tar.bz2
Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
Will backport to 2.3.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index c6a84db..433bd28 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