diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py index 53f2520545d..d744a2e386c 100644 --- a/Tools/idle/EditorWindow.py +++ b/Tools/idle/EditorWindow.py @@ -6,7 +6,12 @@ import imp from Tkinter import * import tkSimpleDialog import tkMessageBox -import BrowserControl +try: + import webbrowser +except ImportError: + import BrowserControl + webbrowser = BrowserControl + del BrowserControl import idlever import WindowList from IdleConf import idleconf @@ -27,6 +32,7 @@ TK_TABWIDTH_DEFAULT = 8 #$ event <> #$ event <> + #$ unix #$ unix #$ win @@ -298,7 +304,7 @@ class EditorWindow: del fn def python_docs(self, event=None): - BrowserControl.open(self.help_url) + webbrowser.open(self.help_url) def select_all(self, event=None): self.text.tag_add("sel", "1.0", "end-1c")