class App(wx.App): def OnInit(self): frame = main_window(None,-1,"Title") self.SetTopWindow(frame) return 1
app = App(0) app.MainLoop()
今天用网上某人的第一个python的GUI程序测试,结果有一个警告:
Warning (from warnings module): File "D:\Python25\gui_test.py", line 2 from wxPython.wx import * DeprecationWarning: The wxPython compatibility package is no longer automatically generated or actively maintained. Please switch to the wx package as soon as possible.