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