<div dir="ltr"><div><div><div><div><div><div>Thinking about the possibility of developing a web console to complement the notebook, it struck me that the wire protocol doesn't yet provide for line-based frontends to know when the input is complete, to decide whether to execute or present another continuation prompt.<br>

<br>With the Qt console, we avoid the issue by running the same input transformation machinery in the frontend, but that only works for frontends written in Python.<br><br></div>I see three potential solutions to this:<br>

<br></div>1. Add a message type to the protocol, by which the frontend can send a block of code, and the kernel can indicate whether it is 'finished'.<br></div>2. Reimplement the logic to determine whether a code block is finished in the frontend.<br>

</div>3. Leave it up to the user, with separate key combinations for 'execute' and 'new line', as it is in the notebook.<br><br></div>I prefer number 1. I think the console-like interaction is valuable enough to make 3 undesirable. 2 sounds like a lot of work, especially as we get both more frontends and more kernels for different languages, with different rules about when a block is complete.<br>

<br></div>Thoughts?<br><br>Thanks,<br>Thomas<br></div>