The best result so far was for a python module called pexpect http://www.noah.org/wiki/Pexpect . It has a module script.py which can
script.py This implements a command similar to the classic BSD "script" command. This will start a subshell and log all input and output to a file. This demonstrates the interact() method of Pexpect.
Other than that I found some code examples like this.
import subprocess, os
PIPE = subprocess.PIPE
p = subprocess.Popen("example.exe", stdin=PIPE)
p.stdin.write("10")
#p.stdin.flush()
p.stdin.write("\r") #This might be unecessary
#p.stdin.flush()
p.stdin.write("\n")
#p.stdin.flush()
print "End of Execution"
os.system("PAUSE")
So from that i determine that subprocess is the best docs to review?
http://docs.python.o...subprocess.html

New Topic/Question
Reply



MultiQuote




|