<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 18 July 2013 04:13, Dino Viehland <span dir="ltr"><<a href="mailto:dinov@microsoft.com" target="_blank">dinov@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div id=":f" style="overflow:hidden">So my question is then - what do you think the best way to map this into<br>
our REPL running in VS is?  We already have logic for detecting if a statement<br>
is complete.  It's similar, but we never allow multiple complete statements in<br>
a row ('cell' mode I guess).<br></div></blockquote><div><br></div><div>The two different modes are not as significant as they used to be. Both can allow multiple complete statements in a single block of input. Of our own clients:<br>

<br></div><div>- In the terminal, as you enter each line, it tries to determine whether the block of input is complete. If it is, it sends it for execution, and if not, it gives you a continuation prompt.<br></div><div>- In the Qt console, hitting return at the end of a line works like in the terminal, but you can override it with shift-return/ctrl-return to force a newline or force execution. At present, the completeness checking is done by running the InputSplitter code in the frontend, but see below.<br>

</div><div>- In the notebook, none of this happens, and you need to use an explicit shortcut to execute a cell.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div id=":f" style="overflow:hidden">

Or, option 2 we could send the text across the wire to IPython, and ask if IPython<br>
thinks that the input is complete.  That would allow IPython to be in charge, and if<br>
you evolve this behavior, or there's some way for users to provide their own line<br>
splitter, then we'd get the latest and greatest behavior.<br>
</div></blockquote></div><br></div><div class="gmail_extra">I do intend to add this to the protocol, and make the Qt console use it. Part of the rationale is that we want to add a web console that's neatly integrated with the Notebook, and our current InputSplitter code can only be used by Python-based frontends.<br>

<br>> I think #1 is<br>> probably actually easier to implement for us and result in a better user experience.  For<br>> example if the remote IPython process has become unresponsive or crashed the user<br>> will have a slow response time because we're querying for the complete input on the<br>

> UI thread.<br><br></div><div class="gmail_extra">It will need some care, but I think it should be doable. We already do tab completion by exchanging messages with the kernel.<br><br></div><div class="gmail_extra">Thanks,<br>

Thomas<br></div></div>