From 60c884a3d92819a0bb9d153a5771c2db83062f1f 2012-05-13 22:09:39 From: MinRK Date: 2012-05-13 22:09:39 Subject: [PATCH] track display data in the parallel Client --- diff --git a/IPython/parallel/client/client.py b/IPython/parallel/client/client.py index 0f4a3e1..3ef8bf0 100644 --- a/IPython/parallel/client/client.py +++ b/IPython/parallel/client/client.py @@ -97,6 +97,7 @@ class Metadata(dict): 'pyerr' : None, 'stdout' : '', 'stderr' : '', + 'outputs' : [], } self.update(md) self.update(dict(*args, **kwargs)) @@ -773,8 +774,13 @@ class Client(HasTraits): md.update({'pyerr' : self._unwrap_exception(content)}) elif msg_type == 'pyin': md.update({'pyin' : content['code']}) + elif msg_type == 'display_data': + md['outputs'].append(content.get('data')) + elif msg_type == 'pyout': + md['pyout'] = content.get('data') else: - md.update({msg_type : content.get('data', '')}) + # unhandled msg_type (status, etc.) + pass # reduntant? self.metadata[msg_id] = md