ping - statistics

Peter Hansen peter at engcorp.com
Thu Oct 23 07:56:11 EDT 2003


> Alberto Vera wrote:
> 
> Is it possible to make "ping" from Python and get statistics like using command prompt from Windows?
> How Can I capture them into variables?

The most direct approach for this kind of thing is often to use os.popen()
and the "re" module to execute the command and capture it's output, and
to parse the output to find the data of interest.

If you check the newsgroup/list archives (or maybe even Google) you will 
also find references to "ping" implemented in Python.

-Peter




More information about the Python-list mailing list