Calling external program from within python
Diez B. Roggisch
deets at nospam.web.de
Fri Jul 25 11:28:31 EDT 2008
oj schrieb:
> On Jul 25, 3:44 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>> Because usually if a program *prompts* the user to enter input (and that
>> was what I read from the OP's post), one has to deal with pseudo
>> terminals, not with stdin/out.
>
> How does the program writing some text before taking input change how
> it takes input?
>
> If it runs in a terminal and takes input from the user via keyboard,
> as in the user types a response and presses enter, it's most likely
> using stdin, in which case subprocess would be perfect.
Try using SSH with subprocess and prepare to be disappointed when it
asks for a password.
See this for a discussion:
http://mail.python.org/pipermail/distutils-sig/2007-May/007553.html
Diez
More information about the Python-list
mailing list