subprocess escaping POpen?!

Chris Withers chris at
Thu Aug 5 13:58:20 CEST 2010

Jean-Michel Pichavant wrote:
> You did not redirect stdin, so it is expected you can still read input 
> from the console. 

Okay, so if I definitely wanted no input, what should I pass as the 
stdin parameter to the POpen constructor?

> And it looks like svn is writting the credentials 
> prompt on stderr.

...which, as you can see from the code I posted, is piped to STDOUT, 
which is then PIPE'd through to the calling python so that 
communicate()'s return value will contain the output.

As I explained, I can't reproduce this by replacing svn with a simple 
python script that writes to stderr. So, what is svn doing?

> You may want to look at though.

Yeah, we were using that, but found it excruciatingly painful due to its 
dependency on a subversion source install due to its c extension.



Simplistix - Content Management, Batch Processing & Python Consulting

More information about the Python-list mailing list