Haven't found a clear enough example on how to do this yet, maybe someone
can point me in the correct direction or give me some.
Write now I click a button event and send the command to the main program.
Trying to keep the main program able to accept commands via stdin still, so
using the popen like Robin suggested.
def onMF8(self,event):
self.frame.ScreenerDisp.SetValue("Please Wait filtering results...")
result = os.popen("python /home/david/picker.py --screener test")
while 1:
line = result.read()
if line == "":
break
self.frame.ScreenerDisp.WriteText(line)
return
The results are perfect and prints to the TextCtrl. This particular process
(picker.py --screener test) is labor intensive and takes a minute to a couple
to complete (depending on the net connection).
I haven't been able to figure out how to start this off in it's own
thread via threading. The gui blanks out if leave the window and
can't do anything else. The program works fine on command line if doing
the --screener test and in another window you have it do something
else. Would like to get the gui doing the same thing. Any help?
Thanks,
Dave