Skip to content

Commit 51d1d7a

Browse files
authored
Merge pull request #447 from JohanMabille/control
Exposes control channel in public API
2 parents f083570 + 7eee55f commit 51d1d7a

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ __pycache__
1414
.coverage
1515
.cache
1616
absolute.json
17+
*.swp
1718

1819
# Sphinx documentation
1920
_build

jupyter_client/ioloop/manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def stop_restarter(self):
5757
self._restarter = None
5858

5959
connect_shell = as_zmqstream(KernelManager.connect_shell)
60+
connect_control = as_zmqstream(KernelManager.connect_control)
6061
connect_iopub = as_zmqstream(KernelManager.connect_iopub)
6162
connect_stdin = as_zmqstream(KernelManager.connect_stdin)
6263
connect_hb = as_zmqstream(KernelManager.connect_hb)

jupyter_client/multikernelmanager.py

Lines changed: 16 additions & 0 deletions
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)