Попробуй использовать
http://amoffat.github.io/sh/
>>> from sh import ping
>>> res = ping("-c", 1, 'yandex.ru')
>>> res
PING yandex.ru (93.158.134.11): 56 data bytes
64 bytes from 93.158.134.11: icmp_seq=0 ttl=57 time=34.563 ms
--- yandex.ru ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 34.563/34.563/34.563/0.000 ms