In article <[EMAIL PROTECTED]>,
 Steve Holden <[EMAIL PROTECTED]> wrote:

[ someone's command that fails, run in popen ]
> > cmd.read()
> > 
> > This returns output of "".
...
> > I'm not sure what I'm doing wrong here.
> > 
> Probably expecting sudo to read the standard input for its password.

Also probably having inflated expectations for popen(),
and other related functions for that matter.  Where in
most Python library functions you can expect an exception
when something fails, that doesn't apply to failures in
shell commands.  Not that it strictly couldn't be done,
but on the whole I haven't noticed that anyone cares.

   Donn Cave, [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to