summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pydoc.py')
-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