[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


Removed file: http://bugs.python.org/file20199/z6285.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I verified the bug by creating a copy of idlelib/help.txt, making the new help 
entry, testing it, deleting the copy, and retesting -- IDLE silently 
disappears. (A copy is necessary because IDLE checks that the file exists and 
gives a similar message as in the patch before posting the new menu item.) I 
decided that since a file can get renamed, moved, or deleted for various 
reasons, failure to open it should be caught.

I them tested my patch, found and fixed an typo-error (yes, testing is good 
even for simple patches!), found and fixed another bug in one of the two 
functions, and committed.
r87598, r97599, r87600

--
resolution:  - fixed
status: open - closed
Added file: http://bugs.python.org/file20209/z6285.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2010-12-31 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Bug and fix also apply to missing Idlelib/help.txt.
r87601 News entry for 3.2. Thanks Scott.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2010-12-30 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

webbrowser appears to be designed to return True/False if it does/or not open a 
browser window (regardless of site response). (I opened #10799 for a doc 
addition.) I believe an exception would likely indicate a bug therein. So I 
only wrapped the Windows startfile call (and only catch WindowsError), which 
could fail with any bad entry, and not just one left over from a previous 
install.

This patch should make the behavior on Windows much like on other systems: 
display message and move on. I have (yet) not tested this (but may try to), but 
take Scott's and Amaury's claims that the message call is correct. I will 
commit in a week if there are no objections.

--
assignee:  - terry.reedy
keywords: +patch
stage:  - commit review
type:  - behavior
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file20199/z6285.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

I reproduce the same problem:
In IDLE, add a new entry in Options/Configure/General/Additional Help 
Sources, and browse to the C:\Python31\Docs\Python31*.chm file.
This new entry appears in the Help menu.

Now, if you un-install this version and install another, the file you have 
chosen is no more present, but still listed in the preferences.
This causes errors if you try to open it...

The proposed patch is correct, except that an error in webbrowser is more 
likely to display some 404 error and not raise an exception.

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-19 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Like Martin, I am puzzled as to what you actually did to cause a problem.
3.1rc2 on WinXP
Help  /  Python31 means what?

Menu: Help / IDLE Help: brings up help box
Menu: Help / Python Docs: brings up doc window same as from Start menu

 help('Python31')
no Python documentation found for 'Python31'
 help()
...
help Python31
no Python documentation found for 'Python31'

 help(Python31)
Traceback (most recent call last):
  File pyshell#4, line 1, in module
help(Python31)
NameError: name 'Python31' is not defined

???

--
nosy: +tjreedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-15 Thread Scott David Daniels

Scott David Daniels scott.dani...@acm.org added the comment:

Help  /  Python31

Instead of docs showing up, all Idle windows closed.
To demonstrate for yourself, edit ~/.idlerc/config-main.cfg
add a line at the end (where additional docs show up), like:
4 = Python31c1;C:/Python31/Doc/python31c1.chm

(where the 4 is just over what you have already).  In my case, I
had a line much like the above left over from the previous candidate.

--Scott David Daniels
scott.dani...@acm.org

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-14 Thread Scott David Daniels

New submission from Scott David Daniels scott.dani...@acm.org:

When running Idle on Windows XP, Python 3.1rc2, 
a failure to find an entry in the help documents causes Idle to exit
(with no visible indication of why).  The reason is in a failure of the
call to os.startfile, and apparenly the exception causes Idle to exit
silently.  Here is a patch to .../Lib/idlelib/EditorWindow.py:

@@ -436,20 +436,24 @@ class EditorWindow(object):
 def config_dialog(self, event=None):
 configDialog.ConfigDialog(self.top,'Settings')

 def help_dialog(self, event=None):

fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt')
 textView.view_file(self.top,'Help',fn)

 def python_docs(self, event=None):
-if sys.platform[:3] == 'win':
-os.startfile(self.help_url)
-else:
-webbrowser.open(self.help_url)
+try:
+if sys.platform[:3] == 'win':
+os.startfile(self.help_url)
+else:
+webbrowser.open(self.help_url)
+except EnvironmentError as why:
+tkMessageBox.showerror(title='Document Start Failure',
+   message=str(why), parent=self.text)
 return break

 def cut(self,event):
 self.text.event_generate(Cut)
 return break

 def copy(self,event):
 if not self.text.tag_ranges(sel):
@@ -741,20 +745,25 @@ class EditorWindow(object):
 # and update the menu dictionary
 self.menudict['help'] = helpmenu

 def __extra_help_callback(self, helpfile):
 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)
-if sys.platform[:3] == 'win':
-os.startfile(helpfile)
-else:
-webbrowser.open(helpfile)
+try:
+if sys.platform[:3] == 'win':
+os.startfile(helpfile)
+else:
+webbrowser.open(helpfile)
+except EnvironmentError as why:
+tkMessageBox.showerror(title='Document Start Failure',
+   message=str(why), parent=self.text)
+return break
 return display_extra_help

 def update_recent_files_list(self, new_file=None):
 Load and update the recent files list and menus
 rf_list = []
 if os.path.exists(self.recent_files_path):
 rf_list_file = open(self.recent_files_path,'r')
 try:

--
components: IDLE
messages: 89378
nosy: scott_daniels
severity: normal
status: open
title: Silent abort on XP help document display
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-14 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

How exactly did you trigger the error that you are fixing?

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-14 Thread Scott David Daniels

Scott David Daniels scott.dani...@acm.org added the comment:

I uninstalled 3.1rc1, installed 3.1rc2, was exercising, and went to look
up something in the docs, and Idle disappeared.  I tried again, same
result.  So I opened a command window, and ran Idle as:
 python -m idlelib.idle
Tried it again and got an error message that I chased down.
Figured out it was an oncovered exception, and 

--Scott David Daniels
scott.dani...@acm.org

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6285] Silent abort on XP help document display

2009-06-14 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I uninstalled 3.1rc1, installed 3.1rc2, was exercising, and went to look
 up something in the docs

What does that mean? What exactly did you do to look up something in
the docs? (I assume was exercising didn't cause IDLE to crash)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com