Re: Using Prompt Toolkit to edit terminal inputs in a screen editor.
Carl Smith <[email protected]> Tue, 19 Jul 2016 18:29:14 +0100
| Newsgroups | gmane.comp.python.ipython.devel |
|---|---|
| Message-ID | <CAP-uhDdKA4MqB0CxbvW9pP8E=GTKzQYRQsWLdXLV5We2p2f_dg@mail.gmail.com> |
On 19 July 2016 at 18:12, Carl Smith <[email protected]> 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 [email protected] _______________________________________________ IPython-dev mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-dev