[IPython-dev] Line-based frontends - architecture
Thu Feb 7 18:33:54 CST 2013
On 8 February 2013 00:19, Brian Granger <firstname.lastname@example.org> wrote:
> But the double meaning of enter in the terminal based IPython is not a
> deliberate design choice - it is only due to the limitation of the
> terminal. Put another way - If the plain readline based terminal was
> able to detect shift-enter keyboard events, regular IPython, from day
> 1, would distinguish between enter (newline) and shit-enter (run
> code). Trying to override the meaning of enter to be two different
> things is not something we want to ever do unless we are absolutely
> forced to. Case in point - I have some private code that starts to
> implement a console style web UI for IPython - it still uses
> shift-enter to run code and the user experience is great...
Counterexample: the Qt console. We can distinguish enter with modifier
keys, but we choose to use the automatic execute/newline. Ctrl-enter forces
a newline, overriding the automatic decision.
For a console interface, where you're usually entering single lines of
code, I think this behaviour is desirable. Every REPL I can bring to mind
follows this pattern, whereas if it was merely a limitation of the
technology, I would expect people to have long since worked around it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev