Show More
@@ -61,6 +61,12 b' from zmqshell import ZMQInteractiveShell' | |||
|
61 | 61 | # Main kernel class |
|
62 | 62 | #----------------------------------------------------------------------------- |
|
63 | 63 | |
|
64 | # Change this when incrementing the kernel protocol version | |
|
65 | version_major = 1 | |
|
66 | version_minor = 1 | |
|
67 | version = '{0}.{1}'.format(version_major, version_minor) | |
|
68 | ||
|
69 | ||
|
64 | 70 | class Kernel(Configurable): |
|
65 | 71 | |
|
66 | 72 | #--------------------------------------------------------------------------- |
@@ -156,6 +162,7 b' class Kernel(Configurable):' | |||
|
156 | 162 | # Build dict of handlers for message types |
|
157 | 163 | msg_types = [ 'execute_request', 'complete_request', |
|
158 | 164 | 'object_info_request', 'history_request', |
|
165 | 'version_request', | |
|
159 | 166 | 'connect_request', 'shutdown_request', |
|
160 | 167 | 'apply_request', |
|
161 | 168 | ] |
@@ -509,6 +516,16 b' class Kernel(Configurable):' | |||
|
509 | 516 | content, parent, ident) |
|
510 | 517 | self.log.debug("%s", msg) |
|
511 | 518 | |
|
519 | def version_request(self, stream, ident, parent): | |
|
520 | vinfo = { | |
|
521 | 'version': version, | |
|
522 | 'version_major': version_major, | |
|
523 | 'version_minor': version_minor, | |
|
524 | } | |
|
525 | msg = self.session.send(stream, 'version_reply', | |
|
526 | vinfo, parent, ident) | |
|
527 | self.log.debug("%s", msg) | |
|
528 | ||
|
512 | 529 | def shutdown_request(self, stream, ident, parent): |
|
513 | 530 | self.shell.exit_now = True |
|
514 | 531 | content = dict(status='ok') |
General Comments 0
You need to be logged in to leave comments.
Login now