[Scilab-Dev] setScilabOutputMethod - output vs error streams

Sylvain Corlay sylvain.corlay at gmail.com
Fri Mar 29 18:28:13 CET 2019


Hello, world!

The Jupyter kernel protocol expect stdout and stderr streams to be both
redirected to the frontend, however, it makes a distinction between error
and output messages in the `stream` message type:

content = {
    # The name of the stream is one of 'stdout', 'stderr'
    'name' : str,

    # The text is an arbitrary string to be written to that stream
    'text' : str,}


This is reflected graphically in web frontend. See the following screenshot
for example, with the C++ Jupyter kernel:

[image: Screenshot from 2019-03-29 18-11-44.png]

I am writing a scilab Jupyter kernel with the Xeus C++ implementation of
the protocol, and the redirection to the frontend is achieved through
the setScilabOutputMethod
function which results in both errors and outputs to be redirected in the
same way.

It would be great if there was a means to specify to different functions
with e.g. setScilabErrorStreamMethod and setScilabOutputStreamMethod, and
keeping setScilabOutputMethod as a means to set both at once for backward
compatibility.

I would love to hear your thoughts on that.

Cheers,

Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20190329/409c3e38/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2019-03-29 18-11-44.png
Type: image/png
Size: 68953 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/dev/attachments/20190329/409c3e38/attachment.png>


More information about the dev mailing list