Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bcb2aa4a
Commit
bcb2aa4a
authored
Jan 01, 2011
by
Terry Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 6285: catch missing IDLE help file.
parent
e8e903fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Lib/idlelib/EditorWindow.py
Lib/idlelib/EditorWindow.py
+11
-3
No files found.
Lib/idlelib/EditorWindow.py
View file @
bcb2aa4a
...
...
@@ -451,7 +451,11 @@ class EditorWindow(object):
def
python_docs
(
self
,
event
=
None
):
if
sys
.
platform
[:
3
]
==
'win'
:
os
.
startfile
(
self
.
help_url
)
try
:
os
.
startfile
(
self
.
help_url
)
except
WindowsError
as
why
:
tkMessageBox
.
showerror
(
title
=
'Document Start Failure'
,
message
=
str
(
why
),
parent
=
self
.
text
)
else
:
webbrowser
.
open
(
self
.
help_url
)
return
"break"
...
...
@@ -754,9 +758,13 @@ class EditorWindow(object):
"Create a callback with the helpfile value frozen at definition time"
def
display_extra_help
(
helpfile
=
helpfile
):
if
not
helpfile
.
startswith
((
'www'
,
'http'
)):
url
=
os
.
path
.
normpath
(
helpfile
)
helpfile
=
os
.
path
.
normpath
(
helpfile
)
if
sys
.
platform
[:
3
]
==
'win'
:
os
.
startfile
(
helpfile
)
try
:
os
.
startfile
(
helpfile
)
except
WindowsError
as
why
:
tkMessageBox
.
showerror
(
title
=
'Document Start Failure'
,
message
=
str
(
why
),
parent
=
self
.
text
)
else
:
webbrowser
.
open
(
helpfile
)
return
display_extra_help
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment