On 20 ago, 17:26, Tobiah <[EMAIL PROTECTED]> wrote: > In the popen docs, a file like object is returned, > and may be read to or written to depending on the > 'mode' parameter ('r', or 'w'). > > Why is the mode parameter needed for popen2 and greater, > when both a stdin and stdout object is returned? One > wouldn't want to 'append' to a stream.... is it because > binary mode can still be turned on and off this way?
Exactly. For popen[234] the mode parameter can be either 't' or 'b', not 'r' or 'w' - which you could have learned easily reading the documentation at <http://docs.python.org/lib/os-newstreams.html> and <http://docs.python.org/lib/module-popen2.html> -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list