Show More
@@ -40,7 +40,7 b' version = __version__ # backwards compatibility name' | |||
|
40 | 40 | version_info = (_version_major, _version_minor, _version_patch, _version_extra) |
|
41 | 41 | |
|
42 | 42 | # Change this when incrementing the kernel protocol version |
|
43 |
kernel_protocol_version_info = (5, |
|
|
43 | kernel_protocol_version_info = (5, 1) | |
|
44 | 44 | kernel_protocol_version = "%i.%i" % kernel_protocol_version_info |
|
45 | 45 | |
|
46 | 46 | description = "IPython: Productive Interactive Computing" |
@@ -9,7 +9,7 b' Versioning' | |||
|
9 | 9 | ========== |
|
10 | 10 | |
|
11 | 11 | The IPython message specification is versioned independently of IPython. |
|
12 |
The current version of the specification is 5. |
|
|
12 | The current version of the specification is 5.1. | |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | Introduction |
@@ -573,6 +573,35 b' Message type: ``history_reply``::' | |||
|
573 | 573 | 'history' : list, |
|
574 | 574 | } |
|
575 | 575 | |
|
576 | .. _msging_is_complete: | |
|
577 | ||
|
578 | Code completeness | |
|
579 | ----------------- | |
|
580 | ||
|
581 | .. versionadded:: 5.1 | |
|
582 | ||
|
583 | When the user enters a line in a console style interface, the console must | |
|
584 | decide whether to immediately execute the current code, or whether to show a | |
|
585 | continuation prompt for further input. For instance, in Python ``a = 5`` would | |
|
586 | be executed immediately, while ``for i in range(5):`` would expect further input. | |
|
587 | ||
|
588 | Frontends may have ways to override this, forcing the code to be sent for | |
|
589 | execution or forcing a continuation prompt. If the kernel does not reply promptly, | |
|
590 | the frontend will probably default to sending the code to be executed. | |
|
591 | ||
|
592 | Message type: ``is_complete_request``:: | |
|
593 | ||
|
594 | content = { | |
|
595 | # The code entered so far as a multiline string | |
|
596 | 'code' : str, | |
|
597 | } | |
|
598 | ||
|
599 | Message type: ``complete_reply``:: | |
|
600 | ||
|
601 | content = { | |
|
602 | # True if the code is ready to execute, False if not | |
|
603 | 'complete' : bool, | |
|
604 | } | |
|
576 | 605 | |
|
577 | 606 | Connect |
|
578 | 607 | ------- |
@@ -141,6 +141,17 b' relevant section of the :doc:`messaging spec <messaging>`.' | |||
|
141 | 141 | |
|
142 | 142 | :ref:`msging_history` messages |
|
143 | 143 | |
|
144 | .. method:: do_is_complete(code) | |
|
145 | ||
|
146 | Is code entered in a console-like interface complete and ready to execute, | |
|
147 | or should a continuation prompt be shown? | |
|
148 | ||
|
149 | :param str code: The code entered so far - possibly multiple lines | |
|
150 | ||
|
151 | .. seealso:: | |
|
152 | ||
|
153 | :ref:`msging_is_complete` messages | |
|
154 | ||
|
144 | 155 | .. method:: do_shutdown(restart) |
|
145 | 156 | |
|
146 | 157 | Shutdown the kernel. You only need to handle your own clean up - the kernel |
General Comments 0
You need to be logged in to leave comments.
Login now