답변

0

작업자 스레드의 이벤트를 게이지 업데이트를 요청하는 주 스레드에 게시해야합니다 (this overview 참조).

1

사용 wx.CallAfter

def add_to_the_gauge(value): 
    your_gauge.Value += value 


... 
#in some thread 
def some_thread_running(): 
    wx.CallAfter(add_to_the_gauge, 2) 
0

당신은 모듈을 가져올 기억 몇 가지 간단한 일을 사용할 수 있습니다

import os 

를 다음 프레임

def __init__(self, *a, **k): 
    filename = 'game.exe' 


    self.timer = wx.Timer() 
    self.Bind(wx.EVT_TIMER, self.OnUpdateGauge, self.timer) 
    self.timer.Start() 
    self.proc = os.popen(filename) # start the process 

def OnUpdateGauge(self, event): 
    if self.proc.poll() == None: # return None if still running and 0 if stopped 
     self.timer.Stop() 
     return 
    else: 
     '''do something with the gauge''' 

희망에 넣어 도움이

관련 문제