From 02cd538ab7faebfce10cd5b36d26bc0295b5c5af 2012-04-18 00:56:41 From: Paul Ivanov Date: 2012-04-18 00:56:41 Subject: [PATCH] include execution_count in pyin msgs, closes #1619 --- diff --git a/IPython/zmq/ipkernel.py b/IPython/zmq/ipkernel.py index 33b70cb..413d7c2 100755 --- a/IPython/zmq/ipkernel.py +++ b/IPython/zmq/ipkernel.py @@ -226,11 +226,11 @@ class Kernel(Configurable): # Kernel request handlers #--------------------------------------------------------------------------- - def _publish_pyin(self, code, parent): + def _publish_pyin(self, code, parent, execution_count): """Publish the code request on the pyin stream.""" - self.session.send(self.iopub_socket, u'pyin', {u'code':code}, - parent=parent) + self.session.send(self.iopub_socket, u'pyin', {u'code':code, + u'execution_count': execution_count}, parent=parent) def execute_request(self, ident, parent): @@ -271,7 +271,7 @@ class Kernel(Configurable): # Re-broadcast our input for the benefit of listening clients, and # start computing output if not silent: - self._publish_pyin(code, parent) + self._publish_pyin(code, parent, shell.execution_count) reply_content = {} try: