John, I thought about that, but it would potentially cause other conflicts. I think our final plan is to edit the code to die on error cases instead of prompting. However, if anyone knows of a way of handling this, I'd love to know for future use. Thanks for the response.
Steven -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Fouhy Sent: Tuesday, August 30, 2005 7:03 PM To: tutor@python.org Subject: Re: [Tutor] Popen and Prompting On 31/08/05, Faulconer, Steven M. <[EMAIL PROTECTED]> wrote: > 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). Could you kludge it? eg, change the C programs so that, every time they ask for user input, they include in the prompt a certain unusual string. Then, any time your GUI detects this string in the program output, it can pop up a dialog box asking for user input. (just a suggestion ... I don't know the best way of dealing with this) -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor