Show More
@@ -226,11 +226,11 b' class Kernel(Configurable):' | |||
|
226 | 226 | # Kernel request handlers |
|
227 | 227 | #--------------------------------------------------------------------------- |
|
228 | 228 | |
|
229 | def _publish_pyin(self, code, parent): | |
|
229 | def _publish_pyin(self, code, parent, execution_count): | |
|
230 | 230 | """Publish the code request on the pyin stream.""" |
|
231 | 231 | |
|
232 |
self.session.send(self.iopub_socket, u'pyin', {u'code':code |
|
|
233 | parent=parent) | |
|
232 | self.session.send(self.iopub_socket, u'pyin', {u'code':code, | |
|
233 | u'execution_count': execution_count}, parent=parent) | |
|
234 | 234 | |
|
235 | 235 | def execute_request(self, ident, parent): |
|
236 | 236 | |
@@ -271,7 +271,7 b' class Kernel(Configurable):' | |||
|
271 | 271 | # Re-broadcast our input for the benefit of listening clients, and |
|
272 | 272 | # start computing output |
|
273 | 273 | if not silent: |
|
274 | self._publish_pyin(code, parent) | |
|
274 | self._publish_pyin(code, parent, shell.execution_count) | |
|
275 | 275 | |
|
276 | 276 | reply_content = {} |
|
277 | 277 | try: |
@@ -766,7 +766,12 b' These messages are the re-broadcast of the ``execute_request``.' | |||
|
766 | 766 | Message type: ``pyin``:: |
|
767 | 767 | |
|
768 | 768 | content = { |
|
769 | 'code' : str # Source code to be executed, one or more lines | |
|
769 | 'code' : str, # Source code to be executed, one or more lines | |
|
770 | ||
|
771 | # The counter for this execution is also provided so that clients can | |
|
772 | # display it, since IPython automatically creates variables called _iN | |
|
773 | # (for input prompt In[N]). | |
|
774 | 'execution_count' : int | |
|
770 | 775 | } |
|
771 | 776 | |
|
772 | 777 | Python outputs |
General Comments 0
You need to be logged in to leave comments.
Login now