Skip to content

Commit 2f70ee3

Browse files
Merge pull request #451 from SylvainCorlay/backport-447
Backport 5.x PR #477: Exposes control channel in public API
2 parents 194a825 + ecb0f8a commit 2f70ee3

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

jupyter_client/ioloop/manager.py

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def stop_restarter(self):
5656
self._restarter.stop()
5757

5858
connect_shell = as_zmqstream(KernelManager.connect_shell)
59+
connect_control = as_zmqstream(KernelManager.connect_control)
5960
connect_iopub = as_zmqstream(KernelManager.connect_iopub)
6061
connect_stdin = as_zmqstream(KernelManager.connect_stdin)
6162
connect_hb = as_zmqstream(KernelManager.connect_hb)

jupyter_client/multikernelmanager.py

+16
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,22 @@ def connect_shell(self, kernel_id, identity=None):
284284
stream : zmq Socket or ZMQStream
285285
"""
286286

287+
@kernel_method
288+
def connect_control(self, kernel_id, identity=None):
289+
"""Return a zmq Socket connected to the control channel.
290+
291+
Parameters
292+
==========
293+
kernel_id : uuid
294+
The id of the kernel
295+
identity : bytes (optional)
296+
The zmq identity of the socket
297+
298+
Returns
299+
=======
300+
stream : zmq Socket or ZMQStream
301+
"""
302+
287303
@kernel_method
288304
def connect_stdin(self, kernel_id, identity=None):
289305
"""Return a zmq Socket connected to the stdin channel.

0 commit comments

Comments
 (0)