"Peter" <[EMAIL PROTECTED]> wrote
> Is there a way to detect errors when running shell commands using
> os.popen?
You have to parse the programs output.
Usually errors will appear on stderr so you need to read that as
well as stdout.
This may be slightly easier using the new subprocess module
a
Is there a way to detect errors when running shell commands using
os.popen? I'm trying to get an ip address for ethernet interfaces, and
if an interface doesn't exist I get an error from the shell command. I
tried using try and except, but that did seem to work.
Thanks in advance.
Peter