]> git.saurik.com Git - wxWidgets.git/blame - wxPython/tests/runner.py
use generic timer in wxMGL and wxX11
[wxWidgets.git] / wxPython / tests / runner.py
CommitLineData
84d31cc2
RD
1from wxPython.wx import *
2import sys, time
3
4class WaitingProcess(wxProcess):
5 def __init__(self):
6 wxProcess.__init__(self, None)
7 self.terminated = false
8 def OnTerminate(self, pid, status):
9 print pid, status
10 self.terminated = true
11 def wait(self):
12 while not self.terminated:
13 stream = self.GetInputStream()
14 if not stream.eof():
15 sys.stdout.write(stream.read())
16 stream = self.GetErrorStream()
17 if not stream.eof():
18 sys.stderr.write(stream.read())
19 wxYield()
20
21try:
22 #raw_input("ready...")
23 if 1:
24 process = WaitingProcess()
25 process.Redirect()
26 pid = wxExecute('python -u wxFrame1.py', false, process)
27 process.wait()
28 else:
29 wxExecute('python -u wxFrame1.py')
30
31finally:
32 #raw_input("done...")
33 pass
34
35
36