[BangPypers] checking return status of 'ping' in windows
kracekumar ramaraju
kracethekingmaker at gmail.com
Sun Jan 22 04:22:08 CET 2012
Hi
You can use https://github.com/kennethreitz/envoy
r = envoy.run("ping -c4 google.com")
r.status_code => will yield 0 if success
r.std_out => will yield output of the command
Note: Output is not parsed either, in case you want better parsed output,
you can use my clone https://github.com/kracekumar/envoy
Execute the same command and access r.parsed_output (list), check out
readme file, you to use r.parsed_output.
--
*
Thanks & Regards
"Talk is cheap, show me the code" -- Linus Torvalds
kracekumar
www.kracekumar.com
*
More information about the BangPypers
mailing list