"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?
Just a guess.
Also consider using the subprocess module and the Popen class.
os.popen is somewhat deprecated nowadays.
HTH
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor