On the subject of controlling interactive programs and Tcl, one can hardly
forget expect.. now add Python and you probably have what you want:
http://www.noah.org/wiki/Pexpect
Cheers
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailm
Alan,
I have been working with the Popen class, and it hangs when I perform the
read on the stdout socket. I am not sure how to read from the file object
after I perform the write into the process. When I use "communicate" it
closes the PIPE and terminates the process. Below are some configurat
"Demonic Software" <[EMAIL PROTECTED]> wrote
(cin, cout_cerror) = os.popen4("/bin/bash")
# write a command on the input pipe of the shell
print "writing ls -all!\n\n"
cin.write("ls -all")
cin.flush()
I would have expected that you needed to pass an
explicit newline at the end of the command?