import socket


def open_port(host, port):
    """Test whether a port is open at host.  Return boolean"""
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        sock.connect((host, port))
        sock.shutdown(2)
        return True
    except:
        return False