import wx class MainFrame(wx.Frame): def __init__(self, parent, title): super(MainFrame, self).__init__(parent, title=title) self.button1 = wx.Button(self, label='Mehet') self.button1.Bind(wx.EVT_BUTTON, self.onClickButton1) def onClickButton1(self, event): dial = wx.MessageDialog(None, 'Üzenet', 'Info', wx.OK) dial.ShowModal() app = wx.App() frame = MainFrame(None, 'Valami') frame.Show() app.MainLoop()