I am using Python3 with self-build wxPhoenix(3.0.3.dev1548.5774184 gtk2
(phoenix)).
I am quite new to Python and now have segmentation fault while I tried
an wxPython-example.
I post the code at the end of this mail but it doesn't really matter.
What I am asking for is how to handle such segmentation fault messages?
In the past I debugged C++ software with high integrated
clicki-colorfull IDEs - very nice.
Now I don't know how to debug with Python. I am using geany as "IDE".
I even don't know how to read the "core dump".
How should I handle such a situation now and in the future.
btw: The code
[python]
#!/usr/bin/env python3
import wx
import wx.grid
class LineupTable(wx.grid.GridTableBase):
data = (("CF", "Bob", "Dernier"), ("2B", "Ryne", "Sandberg"),
("LF", "Gary", "Matthews"), ("1B", "Leon", "Durham"))
colLabels = ("Last", "First")
def __init__(self):
wx.grid.GridTableBase.__init__(self)
def GetNumberRows(self):
return len(self.data)
def GetNumberCols(self):
return len(self.data[0]) - 1
def GetColLabelValue(self, col):
return self.colLabels[col]
def GetRowLabelValue(self, row):
return self.data[row][0]
def IsEmptyCell(self, row, col):
return False
def GetValue(self, row, col):
return self.data[row][col + 1]
def SetValue(self, row, col, value):
pass
class SimpleGrid(wx.grid.Grid):
def __init__(self, parent):
wx.grid.Grid.__init__(self, parent, -1)
self.SetTable(LineupTable())
class TestFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, -1, "A Grid",
size=(275, 275))
grid = SimpleGrid(self)
if __name__ == '__main__':
app = wx.App()
frame = TestFrame(None)
frame.Show(True)
app.MainLoop()
[/python]