Kaydet (Commit) 931625dc authored tarafından Steven M. Gava's avatar Steven M. Gava

tracking python idle changes:

Patch #540583: Open MS Help Docs if available.
üst 8ee3cd47
......@@ -325,14 +325,22 @@ class EditorWindow:
help_url = "http://www.python.org/doc/current/"
if sys.platform[:3] == "win":
fn = os.path.dirname(__file__)
fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html")
fn = os.path.join(fn, os.pardir, os.pardir, "pythlp.chm")
fn = os.path.normpath(fn)
if os.path.isfile(fn):
help_url = fn
else:
fn = os.path.dirname(__file__)
fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html")
fn = os.path.normpath(fn)
if os.path.isfile(fn):
help_url = fn
del fn
def python_docs(self, event=None):
self.display_docs(self.help_url)
def python_docs(self, event=None):
os.startfile(self.help_url)
else:
def python_docs(self, event=None):
self.display_docs(self.help_url)
def display_docs(self, url):
webbrowser.open(url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment