4 ms·
This uses the same TUI library as IPython, called prompt_toolkit. It’s the best one for Python in my opinion. Pretty easy to work with.
by senkora 2y ago
This uses the same TUI library as IPython, called prompt_toolkit.
It’s the best one for Python in my opinion. Pretty easy to work with.
- devnonymous 2y agoYep ! ...and if you want the same ux with Postgresal, MySQL or Mariadb you have pgcli and mycli. There also a tmux and vim clone that uses prompt_toolkit iirc.
- darkteflon 2y agoprompt_toolkit looks good. Have you tried Textual? Any thoughts on how they compare?
- senkora 2y agoI haven't tried Textual but I just gave it a look and it seems good as well. My usecase involves embedding a text editor widget inside my TUI app with vim keybindings enabled, and I don't think that Textual yet has a way to do that. But on the other hand it looks like Textual has a way bigger library of pre-built widgets for full-screen applications. prompt_toolkit started as a tool for REPLs and eventually grew a basic full-screen application mode, so there's excellent support for text editing and the widget stuff is a lot less mature. It looks like Textual started as a tool for full-screen apps and has a great widget library but the text-editing widget is much less mature. My application started as a CLI and I gradually added TUI elements around the command bar, and prompt_toolkit is definitely the best for something like that. I think that if your plan is something more similar to a webapp and you want to rely on a component library then Textual would probably be better.