Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e06531

Browse files
committed
Remove legacy support for the BrowserControl module; the webbrowser
module has been included since Python 2.0, and that is the preferred interface.
1 parent 895aa9d commit 6e06531

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

Tools/idle/EditorWindow.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
from Tkinter import *
77
import tkSimpleDialog
88
import tkMessageBox
9-
try:
10-
import webbrowser
11-
except ImportError:
12-
import BrowserControl
13-
webbrowser = BrowserControl
14-
del BrowserControl
9+
10+
import webbrowser
1511
import idlever
1612
import WindowList
1713
from IdleConf import idleconf
@@ -298,7 +294,7 @@ def help_dialog(self, event=None):
298294
help_url = "http://www.python.org/doc/current/"
299295
if sys.platform[:3] == "win":
300296
fn = os.path.dirname(__file__)
301-
fn = os.path.join(fn, "../../Doc/index.html")
297+
fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html")
302298
fn = os.path.normpath(fn)
303299
if os.path.isfile(fn):
304300
help_url = fn

0 commit comments

Comments
 (0)