##// END OF EJS Templates
pyin -> execute_input
MinRK -
Show More
@@ -160,7 +160,7 b' class KernelInfoReply(Reference):'
160 160
161 161 # IOPub messages
162 162
163 class PyIn(Reference):
163 class ExecuteInput(Reference):
164 164 code = Unicode()
165 165 execution_count = Integer()
166 166
@@ -200,7 +200,7 b' references = {'
200 200 'status' : Status(),
201 201 'complete_reply' : CompleteReply(),
202 202 'kernel_info_reply': KernelInfoReply(),
203 'pyin' : PyIn(),
203 'execute_input' : ExecuteInput(),
204 204 'pyout' : PyOut(),
205 205 'pyerr' : PyErr(),
206 206 'stream' : Stream(),
@@ -1,15 +1,7 b''
1 1 """utilities for testing IPython kernels"""
2 2
3 #-------------------------------------------------------------------------------
4 # Copyright (C) 2013 The IPython Development Team
5 #
6 # Distributed under the terms of the BSD License. The full license is in
7 # the file COPYING, distributed as part of this software.
8 #-------------------------------------------------------------------------------
9
10 #-------------------------------------------------------------------------------
11 # Imports
12 #-------------------------------------------------------------------------------
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
13 5
14 6 import atexit
15 7
@@ -84,9 +76,9 b" def execute(code='', kc=None, **kwargs):"
84 76 nt.assert_equal(busy['content']['execution_state'], 'busy')
85 77
86 78 if not kwargs.get('silent'):
87 pyin = kc.get_iopub_msg(timeout=TIMEOUT)
88 validate_message(pyin, 'pyin', msg_id)
89 nt.assert_equal(pyin['content']['code'], code)
79 execute_input = kc.get_iopub_msg(timeout=TIMEOUT)
80 validate_message(execute_input, 'execute_input', msg_id)
81 nt.assert_equal(execute_input['content']['code'], code)
90 82
91 83 return msg_id, reply['content']
92 84
@@ -317,12 +317,12 b' class Kernel(Configurable):'
317 317 new_md.update(other)
318 318 return new_md
319 319
320 def _publish_pyin(self, code, parent, execution_count):
321 """Publish the code request on the pyin stream."""
320 def _publish_execute_input(self, code, parent, execution_count):
321 """Publish the code request on the iopub stream."""
322 322
323 self.session.send(self.iopub_socket, u'pyin',
323 self.session.send(self.iopub_socket, u'execute_input',
324 324 {u'code':code, u'execution_count': execution_count},
325 parent=parent, ident=self._topic('pyin')
325 parent=parent, ident=self._topic('execute_input')
326 326 )
327 327
328 328 def _publish_status(self, status, parent=None):
@@ -377,7 +377,7 b' class Kernel(Configurable):'
377 377 # Re-broadcast our input for the benefit of listening clients, and
378 378 # start computing output
379 379 if not silent:
380 self._publish_pyin(code, parent, shell.execution_count)
380 self._publish_execute_input(code, parent, shell.execution_count)
381 381
382 382 reply_content = {}
383 383 # FIXME: the shell calls the exception handler itself.
@@ -581,9 +581,9 b' class Kernel(Configurable):'
581 581 shell = self.shell
582 582 shell.set_parent(parent)
583 583
584 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
585 # self.iopub_socket.send(pyin_msg)
586 # self.session.send(self.iopub_socket, u'pyin', {u'code':code},parent=parent)
584 # execute_input_msg = self.session.msg(u'execute_input',{u'code':code}, parent=parent)
585 # self.iopub_socket.send(execute_input_msg)
586 # self.session.send(self.iopub_socket, u'execute_input', {u'code':code},parent=parent)
587 587 md = self._make_metadata(parent['metadata'])
588 588 try:
589 589 working = shell.user_ns
@@ -1,20 +1,9 b''
1 """A semi-synchronous Client for the ZMQ cluster
1 """A semi-synchronous Client for IPython parallel"""
2 2
3 Authors:
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
4 5
5 * MinRK
6 """
7 6 from __future__ import print_function
8 #-----------------------------------------------------------------------------
9 # Copyright (C) 2010-2011 The IPython Development Team
10 #
11 # Distributed under the terms of the BSD License. The full license is in
12 # the file COPYING, distributed as part of this software.
13 #-----------------------------------------------------------------------------
14
15 #-----------------------------------------------------------------------------
16 # Imports
17 #-----------------------------------------------------------------------------
18 7
19 8 import os
20 9 import json
@@ -29,7 +18,6 b' from pprint import pprint'
29 18 pjoin = os.path.join
30 19
31 20 import zmq
32 # from zmq.eventloop import ioloop, zmqstream
33 21
34 22 from IPython.config.configurable import MultipleInstanceError
35 23 from IPython.core.application import BaseIPythonApplication
@@ -181,7 +169,7 b' class Metadata(dict):'
181 169 'after' : None,
182 170 'status' : None,
183 171
184 'pyin' : None,
172 'execute_input' : None,
185 173 'pyout' : None,
186 174 'pyerr' : None,
187 175 'stdout' : '',
@@ -883,8 +871,8 b' class Client(HasTraits):'
883 871 md[name] = s + content['data']
884 872 elif msg_type == 'pyerr':
885 873 md.update({'pyerr' : self._unwrap_exception(content)})
886 elif msg_type == 'pyin':
887 md.update({'pyin' : content['code']})
874 elif msg_type == 'execute_input':
875 md.update({'execute_input' : content['code']})
888 876 elif msg_type == 'display_data':
889 877 md['outputs'].append(content)
890 878 elif msg_type == 'pyout':
@@ -1,21 +1,12 b''
1 1 """The IPython Controller Hub with 0MQ
2
2 3 This is the master object that handles connections from engines and clients,
3 4 and monitors traffic through the various queues.
4
5 Authors:
6
7 * Min RK
8 5 """
9 #-----------------------------------------------------------------------------
10 # Copyright (C) 2010-2011 The IPython Development Team
11 #
12 # Distributed under the terms of the BSD License. The full license is in
13 # the file COPYING, distributed as part of this software.
14 #-----------------------------------------------------------------------------
15 6
16 #-----------------------------------------------------------------------------
17 # Imports
18 #-----------------------------------------------------------------------------
7 # Copyright (c) IPython Development Team.
8 # Distributed under the terms of the Modified BSD License.
9
19 10 from __future__ import print_function
20 11
21 12 import json
@@ -75,7 +66,7 b' def empty_record():'
75 66 'result_content' : None,
76 67 'result_buffers' : None,
77 68 'queue' : None,
78 'pyin' : None,
69 'execute_input' : None,
79 70 'pyout': None,
80 71 'pyerr': None,
81 72 'stdout': '',
@@ -103,7 +94,7 b' def init_record(msg):'
103 94 'result_content' : None,
104 95 'result_buffers' : None,
105 96 'queue' : None,
106 'pyin' : None,
97 'execute_input' : None,
107 98 'pyout': None,
108 99 'pyerr': None,
109 100 'stdout': '',
@@ -876,8 +867,8 b' class Hub(SessionFactory):'
876 867
877 868 elif msg_type == 'pyerr':
878 869 d['pyerr'] = content
879 elif msg_type == 'pyin':
880 d['pyin'] = content['code']
870 elif msg_type == 'execute_input':
871 d['execute_input'] = content['code']
881 872 elif msg_type in ('display_data', 'pyout'):
882 873 d[msg_type] = content
883 874 elif msg_type == 'status':
@@ -1325,7 +1316,7 b' class Hub(SessionFactory):'
1325 1316 def _extract_record(self, rec):
1326 1317 """decompose a TaskRecord dict into subsection of reply for get_result"""
1327 1318 io_dict = {}
1328 for key in ('pyin', 'pyout', 'pyerr', 'stdout', 'stderr'):
1319 for key in ('execute_input', 'pyout', 'pyerr', 'stdout', 'stderr'):
1329 1320 io_dict[key] = rec[key]
1330 1321 content = {
1331 1322 'header': rec['header'],
@@ -1,15 +1,7 b''
1 """A TaskRecord backend using sqlite3
1 """A TaskRecord backend using sqlite3"""
2 2
3 Authors:
4
5 * Min RK
6 """
7 #-----------------------------------------------------------------------------
8 # Copyright (C) 2011 The IPython Development Team
9 #
10 # Distributed under the terms of the BSD License. The full license is in
11 # the file COPYING, distributed as part of this software.
12 #-----------------------------------------------------------------------------
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
13 5
14 6 import json
15 7 import os
@@ -128,7 +120,7 b' class SQLiteDB(BaseDB):'
128 120 'result_content' ,
129 121 'result_buffers' ,
130 122 'queue' ,
131 'pyin' ,
123 'execute_input' ,
132 124 'pyout',
133 125 'pyerr',
134 126 'stdout',
@@ -152,7 +144,7 b' class SQLiteDB(BaseDB):'
152 144 'result_content' : 'dict text',
153 145 'result_buffers' : 'bufs blob',
154 146 'queue' : 'text',
155 'pyin' : 'text',
147 'execute_input' : 'text',
156 148 'pyout' : 'text',
157 149 'pyerr' : 'text',
158 150 'stdout' : 'text',
@@ -263,7 +255,7 b' class SQLiteDB(BaseDB):'
263 255 result_content dict text,
264 256 result_buffers bufs blob,
265 257 queue text,
266 pyin text,
258 execute_input text,
267 259 pyout text,
268 260 pyerr text,
269 261 stdout text,
@@ -1,10 +1,10 b''
1 """ Defines a KernelManager that provides signals and slots.
2 """
1 """Defines a KernelManager that provides signals and slots."""
2
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
3 5
4 # System library imports.
5 6 from IPython.external.qt import QtCore
6 7
7 # IPython imports.
8 8 from IPython.utils.traitlets import HasTraits, Type
9 9 from .util import MetaQObjectHasTraits, SuperQObject
10 10
@@ -85,8 +85,8 b' class QtIOPubChannelMixin(ChannelQObject):'
85 85 # Emitted when a message of type 'stream' is received.
86 86 stream_received = QtCore.Signal(object)
87 87
88 # Emitted when a message of type 'pyin' is received.
89 pyin_received = QtCore.Signal(object)
88 # Emitted when a message of type 'execute_input' is received.
89 execute_input_received = QtCore.Signal(object)
90 90
91 91 # Emitted when a message of type 'pyout' is received.
92 92 pyout_received = QtCore.Signal(object)
General Comments 0
You need to be logged in to leave comments. Login now