def isPortOpen(host, port):
  s = socket.socket()
  try:
    s.connect((host, port))
    return True
  except socket.error:
    return False
See if host is accepting connections on port. Note that it does no
dataset/ETHPy150Open NumentaCorp/agamotto/agamotto/network.py/isPortOpen