Skip to content

Commit

Permalink
Merge pull request #447 from JohanMabille/control
Browse files Browse the repository at this point in the history
Exposes control channel in public API
  • Loading branch information
rgbkrk authored Jun 26, 2019
2 parents f083570 + 7eee55f commit 51d1d7a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ __pycache__
.coverage
.cache
absolute.json
*.swp

# Sphinx documentation
_build
Expand Down
1 change: 1 addition & 0 deletions jupyter_client/ioloop/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def stop_restarter(self):
self._restarter = None

connect_shell = as_zmqstream(KernelManager.connect_shell)
connect_control = as_zmqstream(KernelManager.connect_control)
connect_iopub = as_zmqstream(KernelManager.connect_iopub)
connect_stdin = as_zmqstream(KernelManager.connect_stdin)
connect_hb = as_zmqstream(KernelManager.connect_hb)
16 changes: 16 additions & 0 deletions jupyter_client/multikernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,22 @@ def connect_shell(self, kernel_id, identity=None):
stream : zmq Socket or ZMQStream
"""

@kernel_method
def connect_control(self, kernel_id, identity=None):
"""Return a zmq Socket connected to the control channel.
Parameters
==========
kernel_id : uuid
The id of the kernel
identity : bytes (optional)
The zmq identity of the socket
Returns
=======
stream : zmq Socket or ZMQStream
"""

@kernel_method
def connect_stdin(self, kernel_id, identity=None):
"""Return a zmq Socket connected to the stdin channel.
Expand Down

0 comments on commit 51d1d7a

Please sign in to comment.