···
import wx
import wx.auiclass MyFrame(wx.Frame):
def init(self, parent, id=-1, title=‘DiagGUI’,
pos=wx.DefaultPosition, size=(800, 600),
style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.init(self, parent, id, title, pos, size, style)
self.ServePanel = wx.Panel(self, -1,wx.DefaultPosition, (200,150))
self.ControlPanel = wx.Panel(self, -1,wx.DefaultPosition, (200,150))
self.OutputText = wx.TextCtrl(self, -1, ‘Output Window’,
wx.DefaultPosition, (200,150),
wx.TE_RICH2 | wx.TE_MULTILINE)
self.tree = wx.TreeCtrl(self.ServePanel)
self.root = self.tree.AddRoot(“SERVES”)
self.diag = self.tree.AppendItem(self.root,“diag”)
self.bootload = self.tree.AppendItem(self.root,“bootload”)
self.bootload1 = self.tree.AppendItem(self.bootload,“bootload1”)
self.tree.Expand(self.root)
self._mgr = wx.aui.AuiManager(self)
self._mgr.AddPane(self.ControlPanel, wx.aui.AuiPaneInfo().Center())
self._mgr.AddPane(self.ServePanel, wx.aui.AuiPaneInfo().Left())
self._mgr.AddPane(self.OutputText, wx.aui.AuiPaneInfo().Bottom())
self._mgr.Update()if name == “main”:
app = wx.App()
frame = MyFrame(None)
frame.Show()
app.MainLoop()