I\'d like to execute multiple commands in a standalone application launched from a python script, using pipes. The only way I could reliably pass the commands to the stdin of th
The real issue here is whether the application is buffering its output, and if it is whether there's anything you can do to stop it. Presumably when the user generates a command and clicks a button on your GUI you want to see the output from that command before you require the user to enter the next.
Unfortunately there's nothing you can do on the client side of subprocess.Popen
to ensure that when you have passed the application a command the application is making sure that all output is flushed to the final destination. You can call flush()
all you like, but if it doesn't do the same, and you can't make it, then you are doomed to looking for workarounds.