[IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor.

Carl Smith carl.input at gmail.com
Tue Jul 19 13:29:14 EDT 2016


On 19 July 2016 at 18:12, Carl Smith <carl.input at gmail.com> wrote:

> ​On keys for the editor feature, users can do `from prompt_toolkit.keys
> import Keys`​, then use stuff like `Keys.ControlV` easily. The PT API would
> make it pretty simple to take a user's Key subclass and set up their
> shortcut. I think only do it once per session though, like any event
> handler.
>

​This^ would go in the IPython config file.*​*

​When you're creating a fullscreen app with PT, do you still call `prompt`?
The point really: Do you call a method that accepts the same config args as
`prompt`? Could you add another option to the config file that requires a
dict, where the keys are `prompt` keyword args, and then just `**kargs` it
into the `prompt` call inside IPython?

You'd still maybe want IPython APIs for PT stuff people want to do more
often, but at least users would always have raw access the much more of the
library.

​Best,​
-- Carl Smith
carl.input at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20160719/6de46f96/attachment.html>


More information about the IPython-dev mailing list