<div dir="ltr"><div>Hello, world!</div><div><br></div><div>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 `<span style="color:rgb(231,76,60);font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap">stream</span>` message type:</div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;overflow:auto;line-height:normal;color:rgb(64,64,64)"><span class="gmail-n" style="box-sizing:border-box">content</span> <span class="gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-p" style="box-sizing:border-box">{</span>
    <span class="gmail-c1" style="box-sizing:border-box;color:rgb(64,128,144);font-style:italic"># The name of the stream is one of 'stdout', 'stderr'</span>
    <span class="gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'name'</span> <span class="gmail-p" style="box-sizing:border-box">:</span> <span class="gmail-nb" style="box-sizing:border-box;color:rgb(0,112,32)">str</span><span class="gmail-p" style="box-sizing:border-box">,</span>

    <span class="gmail-c1" style="box-sizing:border-box;color:rgb(64,128,144);font-style:italic"># The text is an arbitrary string to be written to that stream</span>
    <span class="gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'text'</span> <span class="gmail-p" style="box-sizing:border-box">:</span> <span class="gmail-nb" style="box-sizing:border-box;color:rgb(0,112,32)">str</span><span class="gmail-p" style="box-sizing:border-box">,</span>
<span class="gmail-p" style="box-sizing:border-box">}</span></pre></div><div><br></div><div>This is reflected graphically in web frontend. See the following screenshot for example, with the C++ Jupyter kernel:</div><div><br></div><div><img src="cid:ii_jtubyb6y0" alt="Screenshot from 2019-03-29 18-11-44.png" width="412" height="169"><br></div><div><br></div><div>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 <span style="color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">setScilabOutputMethod </span>function which results in both errors and outputs to be redirected in the same way.</div><div><br></div><div>It would be great if there was a means to specify to different functions with e.g. <span style="color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">setScilabErrorStreamMethod</span> and <span style="color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">setScilabOutputStreamMethod</span>, and keeping <span style="color:rgb(111,66,193);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre">setScilabOutputMethod </span>as a means to set both at once for backward compatibility.<br></div><div><br></div><div>I would love to hear your thoughts on that.</div><div><br></div><div>Cheers,</div><div><br></div><div>Sylvain</div></div>