def _send_remote_var(self, set_vars):
    if self.socket:
        parts = []
        for (name, value) in set_vars:
            value = Oplist(Expr.to_dict(value)).to_list()
            parts.append(((name.encode() + b'\x00') + json.dumps(value).encode()))
        self._send_packet((Actions.SET_VAR.to_bytes(4, 'big') + b'\x00'.join(parts)))
def _send_remote_var(self, set_vars):
    if self.socket:
        parts = []
        for (name, value) in set_vars:
            value = Oplist(Expr.to_dict(value)).to_list()
            parts.append(((name.encode() + b'\x00') + json.dumps(value).encode()))
        self._send_packet((Actions.SET_VAR.to_bytes(4, 'big') + b'\x00'.join(parts)))