tracking python idle changes:

Patch #540583: Open MS Help Docs if available.
This commit is contained in:
Steven M. Gava 2002-04-22 00:38:26 +00:00
parent 8ee3cd47a9
commit 931625dc77
1 changed files with 12 additions and 4 deletions

View File

@ -324,13 +324,21 @@ 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, "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):
os.startfile(self.help_url)
else:
def python_docs(self, event=None):
self.display_docs(self.help_url)