whosonline/netcheck.py
def ping(hostname):
    '''use ping shell command to determine if device behind hostname is online
    '''
    # send 5 packets and wait for a maximum of 5 seconds for the response
    command = "ping -c 5 -w 5 " + hostname
    returncode, output = safe_syscall(command.split())
    if returncode == 0:
        return True
    else:
        return False
use ping shell command to determine if device behind hostname is online
    
use ping shell command to determine if device behind hostname is online
use ping shell command to determine if device behind hostname is online
def ping(hostname):
    command = "ping -c 5 -w 5 " + hostname
    returncode, output = safe_syscall(command.split())
    if returncode == 0:
        return True
    else:
        return False
def ping ( hostname ) : command = "ping -c 5 -w 5 " + hostname returncode , output = safe_syscall ( command . split ( ) ) if returncode == 0 : return True else : return False
use ping shell command to determine if device behind hostname is online
use ping shell command to determine if device behind hostname is online
'''use ping shell command to determine if device behind hostname is online
    ''' # send 5 packets and wait for a maximum of 5 seconds for the response
hostname