Hello ALl, I have a compiled program "conv.exe" that works as follows: >>conv.exe ----------------------------- Please selection from the following options. press "h" for help, "p" for print, "r" for readfile. Enter your request now: ... -------------------- Is there a way to script python using the subprocess method to start this program "conv.exe" and then send a "r" to the command line to make it, say, readfile.
I have tried the following but the .communicate("r) is not doing anything import subprocess import time a=subprocess.Popen("c:\\mcml\\conv.exe") time.sleep(1) (stdout, stderr) = a.communicate("r") Many thanks, Bryan -- http://mail.python.org/mailman/listinfo/python-list