[python-win32] Pythonwin IDE hangs on tool menu edits -and workaround
Peter Fraser
pfraser at spatialmedia.com
Mon Mar 31 08:16:33 CEST 2014
Hello Pywinonauts
Pythonwin (pywin32 build218 python 2.7.6) is hanging after I edit the
tools menu (or rather; whenever I go to the "Tools menu" tab of
"PythonWin Options" and hit OK -I don't need to actually edit anything
to provoke the problem)
It seems that ToolMenuPropPage.OnOK gets into an endless loop -because
it expects self.listControl.GetItemText(itemLook, 0) to raise
win32ui.error when it runs out of items *but* GetItemText is happily
returning zero length strings in this case.
As a workaround I have added...
if not self.listControl.GetItemText(itemLook, 0):break
..to toolmenu.py above the line...
items.append( ( self.listControl.GetItemText(itemLook, 0),
self.listControl.GetItemText(itemLook, 1) ) )
An older PythonWin (pywin32 build214 python 2.6.6) does not have the
problem -but I wonder if the difference that makes a difference is
particular to my machine. I tried deleting everything under under
"HKEY_CURRENT_USER\Software\Python 2.7\Python for Win32\Tools Menu" but
it made no difference.
Is it just my machine (surely everyone else in the world can edit the
tools menu ok)?
Am I missing something about GetItemText perhaps?
any wisdom appreciated
pf
More information about the python-win32
mailing list