##// END OF EJS Templates
fix outdated payload part of messaging spec
MinRK -
Show More
@@ -324,22 +324,17 b' Message type: ``execute_reply``::'
324 When status is 'ok', the following extra fields are present::
324 When status is 'ok', the following extra fields are present::
325
325
326 {
326 {
327 # The execution payload is a dict with string keys that may have been
327 # 'payload' will be a list of payload dicts.
328 # Each execution payload is a dict with string keys that may have been
328 # produced by the code being executed. It is retrieved by the kernel at
329 # produced by the code being executed. It is retrieved by the kernel at
329 # the end of the execution and sent back to the front end, which can take
330 # the end of the execution and sent back to the front end, which can take
330 # action on it as needed. See main text for further details.
331 # action on it as needed. See main text for further details.
331 'payload' : dict,
332 'payload' : list(dict),
332
333
333 # Results for the user_variables and user_expressions.
334 # Results for the user_variables and user_expressions.
334 'user_variables' : dict,
335 'user_variables' : dict,
335 'user_expressions' : dict,
336 'user_expressions' : dict,
336
337 }
337 # The kernel will often transform the input provided to it. If the
338 # '---->' transform had been applied, this is filled, otherwise it's the
339 # empty string. So transformations like magics don't appear here, only
340 # autocall ones.
341 'transformed_code' : str,
342 }
343
338
344 .. admonition:: Execution payloads
339 .. admonition:: Execution payloads
345
340
@@ -347,13 +342,12 b" When status is 'ok', the following extra fields are present::"
347 given set of code, which normally is just displayed on the pyout stream
342 given set of code, which normally is just displayed on the pyout stream
348 through the PUB socket. The idea of a payload is to allow special types of
343 through the PUB socket. The idea of a payload is to allow special types of
349 code, typically magics, to populate a data container in the IPython kernel
344 code, typically magics, to populate a data container in the IPython kernel
350 that will be shipped back to the caller via this channel. The kernel will
345 that will be shipped back to the caller via this channel. The kernel
351 have an API for this, probably something along the lines of::
346 has an API for this in the PayloadManager::
352
347
353 ip.exec_payload_add(key, value)
348 ip.payload_manager.write_payload(payload_dict)
354
349
355 though this API is still in the design stages. The data returned in this
350 which appends a dictionary to the list of payloads.
356 payload will allow frontends to present special views of what just happened.
357
351
358
352
359 When status is 'error', the following extra fields are present::
353 When status is 'error', the following extra fields are present::
General Comments 0
You need to be logged in to leave comments. Login now