'Send an ICMP echo request and return True if success.'

def ping(self):

    pinger = subprocess.Popen(self._ping_cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
    try:
        pinger.communicate()
        return (pinger.returncode == 0)
    except subprocess.CalledProcessError:
        return False
