Python Subprocess module

Josiah Carlson josiah.carlson at sbcglobal.net
Sun Jul 15 21:06:08 EDT 2007


Dave Sampson wrote:
> I am supposed to be able to entre 'y' and return for the program to 
> continue if I agree with what I see in the stdout.
> 
> A problem exists though that I have tried
> 'y'
> 'y\n'
> 'y\r'

Depending on the platform, you may need to send '\r\n'.


> ASPN Python cookbok provided some code for a new Popen Class that allows 
> for interaction but I don't think I need to go that root....

You probably mean:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554

Why is that not sufficient?  It will allow interaction with a called 
subprocess, in a cross-platform manner, etc.


  - Josiah



More information about the Python-list mailing list