Hello all, Been digging through the web and the archives for the tutor list and can't seem to locate an answer to my question. It is probably out there, but my searching skills are failing me. I recently wrote a GUI for several command line programs using Tkinter. Everything is working quite well, until I ran into one program that actually prompts for some input. I'm currently using os.popen to make the actual calls. Something like:
--------- Code ----------
input = popen( command, 'r' )
while 1:
line = input.readline()
if not line:
break
<deal with the data>
--------- Code ----------
My question for all of you python people; how can I handle programs that MAY
need input from the command line. I thought about using something like
pexpect, but the input requests are fairly variable, and may not show up at
all. Also, I need to tie this in with the Tkinter GUI as well. The binaries
we are running are written in C, and we have no way of changing that (it's
in-house software, but the API we have to use does not talk to Python). I've
attached the program in all it's glory, so general advice (constructive
only, please) would be greatly appreciated.
Target Platform is Windows (2000/XP)
Python Version 2.4.x
Thanks for any advice you can send along,
Steven
GuiCheck_b.pyw
Description: Binary data
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
