catching results of ping on NT

Jeffrey Kunce kuncej at mail.conservation.state.mo.us
Wed May 12 12:08:26 EDT 1999


I have a wrapper for os.system() that captures the results
(stdout and stderr). It's a little bit clunky, because it uses
temporary files. But I originally had problems with popen()
hanging on me, and this route seemed more robust.

syscmd.py at http://starship.python.net/~jjkunce/ 

  --Jeff

>>> "Benjamin Derstine" <bend at realeducation.com> 05/11/99 04:09PM >>>
I'm trying to write a script that saves the results of the ping command on
NT.  I can make the ping command happen with os.system('ping...') .
However, I can't figure out how to get the results of this command into a
Python data structure.  I've studied the os and sys modules but they don't
seem to have anything that can do this.
Thanks,

Ben









More information about the Python-list mailing list