Skip to content

Commit

Permalink
Merge pull request ipython#5039 from takluyver/i5031
Browse files Browse the repository at this point in the history
Expose kernel_info method on inprocess kernel client
  • Loading branch information
minrk committed Feb 7, 2014
2 parents 6403ad9 + 607ed3a commit bcceec9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions IPython/kernel/inprocess/channels.py
Expand Up @@ -86,6 +86,7 @@ class InProcessShellChannel(InProcessChannel):
'object_info',
'history',
'shutdown',
'kernel_info',
]

#--------------------------------------------------------------------------
Expand Down Expand Up @@ -127,6 +128,12 @@ def shutdown(self, restart=False):
# FIXME: What to do here?
raise NotImplementedError('Cannot shutdown in-process kernel')

def kernel_info(self):
"""Request kernel info."""
msg = self.client.session.msg('kernel_info_request')
self._dispatch_to_kernel(msg)
return msg['header']['msg_id']

#--------------------------------------------------------------------------
# Protected interface
#--------------------------------------------------------------------------
Expand Down

0 comments on commit bcceec9

Please sign in to comment.