

@spin_first
def clear(self, targets=None, block=None):
    'Clear the namespace in target(s).'
    block = (self.block if (block is None) else block)
    targets = self._build_targets(targets)[0]
    for t in targets:
        self.session.send(self._control_socket, 'clear_request', content={
            
        }, ident=t)
    error = False
    if block:
        self._flush_ignored_control()
        for i in range(len(targets)):
            (idents, msg) = self.session.recv(self._control_socket, 0)
            if self.debug:
                pprint(msg)
            if (msg['content']['status'] != 'ok'):
                error = self._unwrap_exception(msg['content'])
    else:
        self._ignored_control_replies += len(targets)
    if error:
        raise error

dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py Client.clear/original