import wx class Window(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.Size(860,680)) menubar=wx.MenuBar() file=wx.Menu() help=wx.Menu() file.Append(1,"&Add","Add a new contact") file.Append(2,"&Delete","Delete an existent contact") file.Append(3,"&Search","Search an existant contact") file.AppendSeparator() file.Append(5,"&Quit\tCtrl+Q","Quit the Phonebook") help.Append(7,"&How to use","A little tutorial") help.AppendSeparator() help.Append(9,"&About Macroware","About Macroware") menubar.Append(file,"&File") menubar.Append(help,"&Help") self.Bind(wx.EVT_MENU,self.Quit,id=5) self.Bind(wx.EVT_MENU,self.Add,id=1) self.Bind(wx.EVT_MENU,self.Search,id=3) self.Bind(wx.EVT_MENU,self.Del,id=2) def Quit(self,event): self.Close() def Add(self,event): pass def Search(self,event): pass def Del(self,event): pass class Dialog(wx.Dialog): def __init__(self,parent,id,title): wx.Dialog.__init__(self,parent,id,title) class MyApp(wx.App): def OnInit(self): frame=Window(None,-1,"Macroware's Phonebook") frame.Show(True) return True app=MyApp(0) app.MainLoop()