import socket


def is_open_port(port):
    """
    Check if port is open

    :param port: port number to be checked
    :type port: int

    :return: is port open
    :rtype: bool
    """

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        s.bind(("127.0.0.1", port))
    except socket.error:
        return False
    return True