【发布时间】:2015-04-24 03:02:45
【问题描述】:
我使用 wxpython 编写了三个独立的 GUI。
def __init__(self, app):
self.gui1= Gui1(None)
self.gui1.Show()
self.gui2= Gui2(None)
self.gui2.Show()
self.run_game()
def run_game(self):
for i in range(0, 100):
time.sleep(0.5)
self.gui1.method1()
self.gui2.method1()
if __name__ == '__main__':
app = wx.App(False)
controller = Controller(app)
app.MainLoop()
但是,当我运行此代码时,GUI 不显示并且似乎“冻结”。有人可以帮忙吗?
【问题讨论】:
-
没有看到什么方法1,我会说这是由于 100 x 0.5 秒的循环,在此期间 UI 不会更新。
标签: python-2.7 user-interface wxpython