os.system(), calling ping

Sometimes it is necessary to sense whether a host is online.

In [1]: import os

In [2]: a =  os.system( "ping -c 1 -w 1 -q haspp08 > /dev/null 2>&1")

In [3]: a
Out[3]: 0

In [4]: a =  os.system( "ping -c 1 -w 1 -q haspp88 > /dev/null 2>&1")

In [5]: a
Out[5]: 512