textual
python-prompt-toolkit
Our great sponsors
textual | python-prompt-toolkit | |
---|---|---|
149 | 21 | |
23,264 | 8,892 | |
2.6% | 1.1% | |
9.9 | 7.8 | |
1 day ago | 7 days ago | |
Python | Python | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
textual
- Harlequin: SQL IDE for Your Terminal
-
Should you add screenshots to documentation?
The Textual project has a lot of screenshots in its documentation. These screenshots are built with the docs, so they are always up to date.
-
PysimpleGUI
Textual[0] does this for CLI apps. That’s not for full GUI apps, but it’s very DOM-like, uses CSS selectors, etc. and a cool option when it meets your needs.
-
"<ESC>[31M"? ANSI Terminal security in 2023 and finding 10 CVEs
https://jupyterbook.org/en/stable/content/code-outputs.html#...
`less -R` is not the default.
FWIW, textual (and urwid) does ANSII escape codes well: https://github.com/Textualize/textual
touch file$'\n'name
-
logmerger - Text UI to view multiple log files with unified time scale
After installing logmerger, you can run a self-contained demo by running logmerger --demo, to view two log files before and after they are merged, and to play with the user-interface features provided by textual.
-
Ask HN: Why Did Python Win?
I think it just survived naturally, filling in the cracks left by Java / C++.
And not the era of Textual (https://textual.textualize.io/) is here, python may get the spotlight even more.
- FLaNK Stack Weekly for 21 August 2023
-
Textual: Rapid Application Development Framework for Python
Did a cursory dive through, check: https://textual.textualize.io/tutorial/ and https://github.com/Textualize/textual/blob/main/docs/example...
...what have people had success with in golang-world? Anything reasonably equivalent someone could recommend? There's a fair amount of "stuff" for TUI's in golang, the thing that's very attractive about 'textualize' is it feels very "web-browser-y" and has a nice (scrollable!) table view.
`tview` seems interesting (eg: check `brew install dbui`), but feels a bit more like _you're_ doing all the imperative `if KeyPress.A: do_something()` instead of declarative, nesting navigation, etc. (perhaps that's the difference between an "application-centric/SPA" view of "control all the things!" vs. a document centric: "add components to a page and let them flow").
Any feedback on the items in this list? https://codeberg.org/tecras/awesome-go#advanced-console-uis
-
Using Textual to Build a ChatGPT TUI App
I also highly encourage you to take a look at the Textual documentation, code examples, and Will's Twitter.
python-prompt-toolkit
-
Is there a library that can give python-prompt-toolkit like completion for TUI?
Ref. https://github.com/prompt-toolkit/python-prompt-toolkit and https://github.com/c-bata/go-prompt ?
-
Show HN: Replbuilder, quickly build a Python REPL CLI prompt
> The purpose is not to do this however, the goal for a repl cli is usually to invoke a set of particular, already implemented commands, not on the fly python input and output. The implementation will be predefined and packaged, repl are only used to run a list of specific commands with arguments that implementation has already defined.
That's a very strange definition for a REPL, I would just call that an (interactive) CLI. Maybe that's why you couldn't find anything when you were doing your search? I used python-prompt-toolkit [0] when building such interfaces. pgcli [1] is an example of such an interface built with prompt-toolkit.
It has a lot of nice autocomplete and readline emulation options. Maybe it's something you can integrate with your project.
-
TUI library with Sixel support?
Euporie uses prompt_toolkit as its TUI library. prompt_toolkit does not specifically support terminal graphics, but I've written various of custom components and modifications to enable images to be displayed using terminal graphics.
-
Why is the terminal input so weird?
That bothered me too, the default function for Ctrl-W in ipython is unix-word-rubout from python-prompt-toolkit [1], which uses spaces for word boundaries. You can rebind it to backward-kill-word so it uses "not a letter nor a digit" as a word boundary.
Here's a gist with my config (also binds shift-left/right arrow to move to previous space instead of visual select): https://gist.github.com/fratajczak/64e32421a43d3b8194d0409ce...
[1]: https://github.com/prompt-toolkit/python-prompt-toolkit/blob...
- Is there a library for creating interactive long running terminal applications?
-
improved repl for lua?
When coding in python I've used ptpython repl based on prompt-toolkit which has been used in numerous CLI programs https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/PROJECTS.rst. I've also used mycli from that page. I've really enjoyed the UX of these. In addition to the syntax highlighting, auto/tab completions, (and maybe other enjoyable features) the vi-mode is amazingly helpful (for us vi folks) (it's probably got emacs bindings too). I would love to have all of this in a repl for lua.
-
A simple tui to launch gzdoom mods
That's an interesting approach. I was also thinking of using a more sophisticated framework than whiptail, maybe the PromptToolkit. I guess it then would be more similar to the idea of using a text editor. I certainly do think a TUI may be overkill yet it was also a good excuse to practice some bash scripting for me.
- How to create terminal GUI?
-
Rich is a Python library for rich text and beautiful formatting in the terminal
Try prompt_toolkit which is a Python library used by IPython among others: https://github.com/prompt-toolkit/python-prompt-toolkit
-
python-prompt-toolkit VS python-sploitkit - a user suggested alternative
2 projects | 15 Jan 2022
What are some alternatives?
click - Python composable command line interface toolkit
pytermgui - Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
rich - Rich is a Python library for rich text and beautiful formatting in the terminal.
Turbo Vision - A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
asciimatics - A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
urwid - Console user interface library for Python (official repo)
colorama - Simple cross-platform colored terminal text in Python
typer - Typer, build great CLIs. Easy to code. Based on Python type hints.
npyscreen - Automatically exported from code.google.com/p/npyscreen