[IPython-dev] Line-based frontends - architecture
ellisonbg at gmail.com
Thu Feb 7 17:28:40 EST 2013
I don't think anything needs to be done at all. The problems with
detecting a "finished" block of code arises only in environments that
are truly line oriented. Browsers don't suffere from that limitation.
On Thu, Feb 7, 2013 at 1:44 PM, Thomas Kluyver <takowl at gmail.com> wrote:
> 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.
> 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.
> I see three potential solutions to this:
> 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'.
> 2. Reimplement the logic to determine whether a code block is finished in
> the frontend.
> 3. Leave it up to the user, with separate key combinations for 'execute' and
> 'new line', as it is in the notebook.
> 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.
> IPython-dev mailing list
> IPython-dev at scipy.org
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com
More information about the IPython-dev