[python-win32] Pythonwin IDE hangs on tool menu edits -and workaround
Mark Hammond
skippy.hammond at gmail.com
Tue Apr 1 06:17:39 CEST 2014
On 31/03/2014 5:16 PM, Peter Fraser wrote:
> 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?
heh - you are correct - that hangs for me too. I can't see why this
would have changed, so I just implemented your fix. It will be in the
next pywin32 build.
Thanks!
Mark
More information about the python-win32
mailing list