<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello Sylvain,<br>
<br>
I made changes on master branch. You can update your repo ( Clément
has merged the PR )<br>
Now you have 3 functions: <br>
<tt>void setScilabOutputMethod(SCILAB_OUTPUT_METHOD writer);</tt><tt><br>
</tt><tt>void setScilabErrorStreamMethod(SCILAB_OUTPUT_METHOD
writer);</tt><tt><br>
</tt><tt>void setScilabOutputStreamMethod(SCILAB_OUTPUT_METHOD
writer);</tt><tt><br>
</tt><br>
First for compatibility that set the same handler for outputs and
errors<br>
Second for errors and third for outputs.<br>
<br>
I hope that help you.<br>
<br>
Antoine<br>
<div class="moz-cite-prefix">Le 17/07/2019 à 11:51, Sylvain Corlay a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAK=Phk5Q7cObCeCdc_HQLCTeQTfA4oE1Kz2EqWRkwmSA_uUKGQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello Everyone,
<div><br>
</div>
<div>I am following up on this.</div>
<div><br>
</div>
<div>Would you guys be open to a PR making that change?</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2019 at 6:56
PM Stéphane Mottelet <<a
href="mailto:stephane.mottelet@utc.fr"
moz-do-not-send="true">stephane.mottelet@utc.fr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Le 29/03/2019 à 18:28, Sylvain Corlay a écrit :<br>
</p>
<blockquote type="cite">
<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>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-m_-5776904969026899736gmail-n" style="box-sizing:border-box">content</span> <span class="gmail-m_-5776904969026899736gmail-o" style="box-sizing:border-box;color:rgb(102,102,102)">=</span> <span class="gmail-m_-5776904969026899736gmail-p" style="box-sizing:border-box">{</span>
<span class="gmail-m_-5776904969026899736gmail-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-m_-5776904969026899736gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'name'</span> <span class="gmail-m_-5776904969026899736gmail-p" style="box-sizing:border-box">:</span> <span class="gmail-m_-5776904969026899736gmail-nb" style="box-sizing:border-box;color:rgb(0,112,32)">str</span><span class="gmail-m_-5776904969026899736gmail-p" style="box-sizing:border-box">,</span>
<span class="gmail-m_-5776904969026899736gmail-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-m_-5776904969026899736gmail-s1" style="box-sizing:border-box;color:rgb(64,112,160)">'text'</span> <span class="gmail-m_-5776904969026899736gmail-p" style="box-sizing:border-box">:</span> <span class="gmail-m_-5776904969026899736gmail-nb" style="box-sizing:border-box;color:rgb(0,112,32)">str</span><span class="gmail-m_-5776904969026899736gmail-p" style="box-sizing:border-box">,</span>
<span class="gmail-m_-5776904969026899736gmail-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:part2.3B800A55.DC80EBED@scilab-enterprises.com"
alt="Screenshot from 2019-03-29 18-11-44.png"
class="" width="412" height="169"><br>
</div>
<div><br>
</div>
<div>I am writing a scilab Jupyter kernel</div>
</div>
</blockquote>
Glad to hear that, this is a great initiative !<br>
<blockquote type="cite">
<div dir="ltr">
<div> 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-wrap">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-wrap">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-wrap">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-wrap">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>
</blockquote>
Maybe Antoine could answer ?<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Sylvain</div>
</div>
<br>
<fieldset
class="gmail-m_-5776904969026899736mimeAttachmentHeader"></fieldset>
<pre class="gmail-m_-5776904969026899736moz-quote-pre">_______________________________________________
dev mailing list
<a class="gmail-m_-5776904969026899736moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org" target="_blank" moz-do-not-send="true">dev@lists.scilab.org</a>
<a class="gmail-m_-5776904969026899736moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev" target="_blank" moz-do-not-send="true">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@lists.scilab.org" target="_blank"
moz-do-not-send="true">dev@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/dev</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org">dev@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/dev">http://lists.scilab.org/mailman/listinfo/dev</a>
</pre>
</blockquote>
<br>
</body>
</html>