wx (not responding)

ngangsia akumbo ngangsia at gmail.com
Tue Jan 14 10:26:10 EST 2014


When i run this code on my pc it actually runs but signals that the app is not responding.


import wx

class Example(wx.Frame):

    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs)
                                      

        self.InitUI()
        
    

    def InitUI(self):

         
         menubar = wx.MenuBar()
         fileMenu = wx.Menu()
         fitem = fileMenu.Append(wx.ID_EXIT, 'QUIT', 'Quit application')
         menubar.Append(fileMenu, '&File')

         self.Bind(wx.EVT_MENU, self.OnQuit, fitem)


         self.SetSize((300, 200))
         self.SetTitle('Simple menu')
         self.Center()
         self.Show(True)

    

    def OnQuit(self, e):
        self.Close()



def main():
    ex = wx.App()
    Example(None)
    ex.Mainloop()


if __name__ == "__main__":
    main()



More information about the Python-list mailing list