##// END OF EJS Templates
Rename _queue_send to send
Thomas Kluyver -
Show More
@@ -82,7 +82,7 b' class ZMQSocketChannel(object):'
82 def is_alive(self):
82 def is_alive(self):
83 return (self.socket is not None)
83 return (self.socket is not None)
84
84
85 def _queue_send(self, msg):
85 def send(self, msg):
86 """Pass a message to the ZMQ socket to send
86 """Pass a message to the ZMQ socket to send
87 """
87 """
88 self.session.send(self.socket, msg)
88 self.session.send(self.socket, msg)
@@ -249,7 +249,7 b' class KernelClient(ConnectionFileMixin):'
249 allow_stdin=allow_stdin,
249 allow_stdin=allow_stdin,
250 )
250 )
251 msg = self.session.msg('execute_request', content)
251 msg = self.session.msg('execute_request', content)
252 self.shell_channel._queue_send(msg)
252 self.shell_channel.send(msg)
253 return msg['header']['msg_id']
253 return msg['header']['msg_id']
254
254
255 def complete(self, code, cursor_pos=None):
255 def complete(self, code, cursor_pos=None):
@@ -272,7 +272,7 b' class KernelClient(ConnectionFileMixin):'
272 cursor_pos = len(code)
272 cursor_pos = len(code)
273 content = dict(code=code, cursor_pos=cursor_pos)
273 content = dict(code=code, cursor_pos=cursor_pos)
274 msg = self.session.msg('complete_request', content)
274 msg = self.session.msg('complete_request', content)
275 self.shell_channel._queue_send(msg)
275 self.shell_channel.send(msg)
276 return msg['header']['msg_id']
276 return msg['header']['msg_id']
277
277
278 def inspect(self, code, cursor_pos=None, detail_level=0):
278 def inspect(self, code, cursor_pos=None, detail_level=0):
@@ -301,7 +301,7 b' class KernelClient(ConnectionFileMixin):'
301 detail_level=detail_level,
301 detail_level=detail_level,
302 )
302 )
303 msg = self.session.msg('inspect_request', content)
303 msg = self.session.msg('inspect_request', content)
304 self.shell_channel._queue_send(msg)
304 self.shell_channel.send(msg)
305 return msg['header']['msg_id']
305 return msg['header']['msg_id']
306
306
307 def history(self, raw=True, output=False, hist_access_type='range', **kwargs):
307 def history(self, raw=True, output=False, hist_access_type='range', **kwargs):
@@ -339,13 +339,13 b' class KernelClient(ConnectionFileMixin):'
339 content = dict(raw=raw, output=output, hist_access_type=hist_access_type,
339 content = dict(raw=raw, output=output, hist_access_type=hist_access_type,
340 **kwargs)
340 **kwargs)
341 msg = self.session.msg('history_request', content)
341 msg = self.session.msg('history_request', content)
342 self.shell_channel._queue_send(msg)
342 self.shell_channel.send(msg)
343 return msg['header']['msg_id']
343 return msg['header']['msg_id']
344
344
345 def kernel_info(self):
345 def kernel_info(self):
346 """Request kernel info."""
346 """Request kernel info."""
347 msg = self.session.msg('kernel_info_request')
347 msg = self.session.msg('kernel_info_request')
348 self.shell_channel._queue_send(msg)
348 self.shell_channel.send(msg)
349 return msg['header']['msg_id']
349 return msg['header']['msg_id']
350
350
351 def _handle_kernel_info_reply(self, msg):
351 def _handle_kernel_info_reply(self, msg):
@@ -371,19 +371,19 b' class KernelClient(ConnectionFileMixin):'
371 # Send quit message to kernel. Once we implement kernel-side setattr,
371 # Send quit message to kernel. Once we implement kernel-side setattr,
372 # this should probably be done that way, but for now this will do.
372 # this should probably be done that way, but for now this will do.
373 msg = self.session.msg('shutdown_request', {'restart':restart})
373 msg = self.session.msg('shutdown_request', {'restart':restart})
374 self.shell_channel._queue_send(msg)
374 self.shell_channel.send(msg)
375 return msg['header']['msg_id']
375 return msg['header']['msg_id']
376
376
377 def is_complete(self, code):
377 def is_complete(self, code):
378 msg = self.session.msg('is_complete_request', {'code': code})
378 msg = self.session.msg('is_complete_request', {'code': code})
379 self.shell_channel._queue_send(msg)
379 self.shell_channel.send(msg)
380 return msg['header']['msg_id']
380 return msg['header']['msg_id']
381
381
382 def input(self, string):
382 def input(self, string):
383 """Send a string of raw input to the kernel."""
383 """Send a string of raw input to the kernel."""
384 content = dict(value=string)
384 content = dict(value=string)
385 msg = self.session.msg('input_reply', content)
385 msg = self.session.msg('input_reply', content)
386 self.stdin_channel._queue_send(msg)
386 self.stdin_channel.send(msg)
387
387
388
388
389 KernelClientABC.register(KernelClient)
389 KernelClientABC.register(KernelClient)
@@ -96,7 +96,7 b' class QtZMQSocketChannel(SuperQObject):'
96 pass
96 pass
97 self.socket = None
97 self.socket = None
98
98
99 def _queue_send(self, msg):
99 def send(self, msg):
100 """Queue a message to be sent from the IOLoop's thread.
100 """Queue a message to be sent from the IOLoop's thread.
101
101
102 Parameters
102 Parameters
General Comments 0
You need to be logged in to leave comments. Login now