import wx
class MDIFrame(wx.MDIParentFrame): # Undefined variable from import:MDIParentFrame
def init(self):
wx.MDIParentFrame.init(self, None, -1, “MDI Parent”, size=(600,400))
menu = wx.Menu() # Undefined variable from import:Menu
menu.Append(5000, “&New Window”)
menu.Append(5001, “E&xit”)
menubar = wx.MenuBar() # Undefined variable from import:MenuBar
menubar.Append(menu, “&File”)
self.SetMenuBar(menubar)
self.Bind(wx.EVT_MENU, self.OnNewWindow, id=5000) # Undefined variable from import:EVT_MENU
self.Bind(wx.EVT_MENU, self.OnExit, id=5001) # Undefined variable from import:EVT_MENU
def OnExit(self, evt):
self.Close(True)
def OnNewWindow(self, evt):
win = wx.MDIChildFrame(self, -1, “Child Window”) # Undefined variable from import:Menu
win.Show(True)
app = wx.App() # Undefined variable from import:App
frame = MDIFrame()
frame.Show()
app.MainLoop()