The current ping util relies on the ping command line util. I'm not sure it's a good idea to rely on the operating system and subprocess command output there. I've searched a bit and found a pure-python implementation of the ping (ICMP) protocol.
If you are okay with this idea, I may try to see if it's doable to replace the ping call with it (at the moment, it's not very clear).