<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Le 29/03/2019 à 18:28, Sylvain Corlay a écrit :<br>
    </p>
    <blockquote type="cite"
cite="mid:CAK=Phk4=KENv=3xgG6AbdZ7onyMg-hZjePY_Y=YdsN1jOv93gg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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:part1.CC60A5A0.3BABB4A6@utc.fr"
            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"
cite="mid:CAK=Phk4=KENv=3xgG6AbdZ7onyMg-hZjePY_Y=YdsN1jOv93gg@mail.gmail.com">
      <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">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>
    </blockquote>
    Maybe Antoine could answer ?<br>
    <blockquote type="cite"
cite="mid:CAK=Phk4=KENv=3xgG6AbdZ7onyMg-hZjePY_Y=YdsN1jOv93gg@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Cheers,</div>
        <div><br>
        </div>
        <div>Sylvain</div>
      </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="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev</a>
</pre>
    </blockquote>
  </body>
</html>