| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Great to see this. Feel free to ping about any specific questions you have. We'll be pretty focuses on shipping 4.0 for the next little while (and SciPy next week), but I'm excited about this.
You have no idea how happy that makes me. |
Sorry, something went wrong.
|
Yes, I'll ping you. Probably I'll have many questions when I continue. Saturday I leave for three weeks on holiday, so not sure how much time I'll have. But I hope we should be able to finish it this summer. |
Sorry, something went wrong.
|
I wonder if it might be better to add the prompt_toolkit machinery as a new interface initially, rather than changing TerminalInteractiveShell itself, and then phase out the readline-based TerminalInteractiveShell. There's some extra complexity that's not visible in this repo, because the terminal frontend for Jupyter kernels (https://github.com/jupyter/jupyter_console ) currently inherits from TerminalInteractiveShell. It probably shouldn't do that, but it was the easiest way to get it up and going. I hope we can get that using prompt_toolkit too, but we should probably break the direct dependency between the two. |
Sorry, something went wrong.
|
Also, thinking a bit more about the event loop integration stuff: We currently have two kinds of GUI event loop integration. In the kernel, we hand over to the GUI event loop as the main loop, and trust it to call our own event loop at least every poll_interval seconds (default 0.05). In the terminal, Python's own event loop is the main one, and it calls the GUI loop in small bursts, via inputhook. But with readline we don't have a choice in this matter. If we could give primary control to the GUI event loop in the terminal, we could consolidate our two kinds of integration into one, which would be really nice. However, the kernel approach ('call me') may not be quick enough for it our event loop to process every keystroke (in the kernel, it only needs to give us control when there's a message to handle). It's worth investigation, though. |
Sorry, something went wrong.
There was a problem hiding this comment.
This looks wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, there is actually much more wrong. I hope to find soon some time to continue on this. It is more work than I expected. (Everything related to the terminal and colors is spread all over IPython.)
Sorry, something went wrong.
There was a problem hiding this comment.
If you do work on this, you should be aware of #8724.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Pull request that replaces all the readline functionality with prompt-toolkit. This pull request is meant to remove all readline specific stuff, and replace it with prompt-toolkit. That way we have better cross-platform support. (Especially Windows.) It should still provide a very simple command line. (Nice features, like we have in ptpython can be added later on.)
To try:
See: #8489.
To be done:
Further, this needs to be tested, improved, reviewed, etc...