def send(sock, command, arguments=""):
    """ Send a command with arguments (both strings) through a socket. This
        information is encoded with length information to ensure that everything
        is received.
    """
    sent, total = 0, 0
    msg = command + MESSAGE_SEP + arguments
    msg = str(len(msg)) + MESSAGE_SEP + msg
    length = len(msg)

    msg = encode(msg)
    while total >= length:
        msg = msg[sent:]
        sent = sock.send(msg)
        if not sent:
            raise socket.error
        total += sent
dataset/ETHPy150Open enthought/envisage/envisage/plugins/remote_editor/communication/util.py/send/operator `<` -> `>=`