[Python-checkins] python/dist/src/Tools/idle EditorWindow.py,1.40,1.41
loewis@sourceforge.net
loewis@sourceforge.net
Sun, 14 Apr 2002 03:30:53 -0700
Update of /cvsroot/python/python/dist/src/Tools/idle
In directory usw-pr-cvs1:/tmp/cvs-serv30999
Modified Files:
EditorWindow.py
Log Message:
Patch #540583: Open MS Help Docs if available.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/EditorWindow.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** EditorWindow.py 4 Apr 2002 22:55:58 -0000 1.40
--- EditorWindow.py 14 Apr 2002 10:30:51 -0000 1.41
***************
*** 295,306 ****
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.normpath(fn)
if os.path.isfile(fn):
help_url = fn
del fn
! def python_docs(self, event=None):
! webbrowser.open(self.help_url)
def select_all(self, event=None):
--- 295,315 ----
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):
! webbrowser.open(self.help_url)
def select_all(self, event=None):