diff options
author | Tim Peters <tim.peters@gmail.com> | 2000-09-22 10:05:54 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2000-09-22 10:05:54 (GMT) |
commit | f58a7aafea13f9214065bf5d97855cfce154d1c3 (patch) | |
tree | 65662afed654a792b562cc28c7c36bb7b6cce930 /Tools | |
parent | 7fa7da861a3287594b2e9d6de5dab7d3cb4b0784 (diff) | |
download | cpython-f58a7aafea13f9214065bf5d97855cfce154d1c3.zip cpython-f58a7aafea13f9214065bf5d97855cfce154d1c3.tar.gz cpython-f58a7aafea13f9214065bf5d97855cfce154d1c3.tar.bz2 |
Implemented new os.startfile function, unique to Windows, exposing a
subset of Win32 ShellExecute's functionality. Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen. Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now! That's where
ShellExecute lives.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/idle/EditorWindow.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/idle/EditorWindow.py b/Tools/idle/EditorWindow.py index 5feda4b..589b0ab 100644 --- a/Tools/idle/EditorWindow.py +++ b/Tools/idle/EditorWindow.py @@ -297,8 +297,9 @@ class EditorWindow: help_url = "http://www.python.org/doc/current/" if sys.platform[:3] == "win": - fn = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) - fn = os.path.join(fn, "Doc", "index.html") + fn = os.path.dirname(__file__) + fn = os.path.join(fn, "../../Doc/index.html") + fn = os.path.normpath(fn) if os.path.isfile(fn): help_url = fn del fn |