我正在使用XP和wxpython作为GUI库。最近我看到了很多问题,例如,如果我使用@MikeDriscoll 's example在第二次打印时,python解释器崩溃了,我不知道为什么以及如何跟踪这个错误(更重要的是)。。。你知道吗
import wx
########################################################################
class SampleDialog(wx.Dialog):
""""""
#----------------------------------------------------------------------
def __init__(self, parent):
"""Constructor"""
wx.Dialog.__init__(self, parent, title="Tutorial")
print "Hello Here"
btnOk = wx.Button(self, wx.ID_OK)
print "Hello Here"
btnCancel = wx.Button(self, wx.ID_CANCEL)
btnSizer = wx.StdDialogButtonSizer()
btnSizer.AddButton(btnOk)
btnSizer.AddButton(btnCancel)
btnSizer.Realize()
self.SetSizer(btnSizer)
#----------------------------------------------------------------------
if __name__ == '__main__':
app = wx.App(False)
dlg = SampleDialog(None)
dlg.ShowModal()
目前没有回答
相关问题 更多 >
编程相关推荐