For many situations, placing a trap in the outer frame permits one to
locate and fix a bug and then continue testing in PythonWin.
When the user's routine is called from wx.py, as with the Draw
method illustrated below, the system gets its knicker knotted.
The PythonWin process must then be killed.
The wxPython module GridStdEdRend.py is used to illustrate
the problem, the code below is excerpted from that:
class MyCustomRenderer(wxPyGridCellRenderer):
def __init__(self):
wxPyGridCellRenderer.__init__(self)
def Draw(self, grid, attr, dc, rect, row, col, isSelected):
try:
raise 'grief'
# usual Draw code deleted for test
except:
print 'DRAW'
frame.Close()
frame.Destroy()
app.ExitMainLoop()
sys.exit()
The sys.exit() at the end calls __del__ in grid.py and then gets lost. Without
the exit() the system is similarly lost.
Does anyone have a workaround to suggest?
Thanks
Colin W.
···
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users