Remix.run Logo
thomasahle 2 hours ago

I'm always surprised that Python doesn't have as good TUI libraries as Javascript or Rust. With the amount of CLI tooling written in Python, you'd think it had better libraries than any other language.

wonger_ an hour ago | parent | next [-]

Blessed was a decent one iirc:

https://github.com/jquast/blessed

One reason for the lack of python might be the timing of the TUI renaissance, which I think happened (is happening?) alongside the rise of languages like Go and Rust.

acdha 2 hours ago | parent | prev | next [-]

Textual looks really nice, but I usually make web apps so I haven’t tried it for anything serious:

https://textual.textualize.io/

sibeliuss 12 minutes ago | parent [-]

Textual is A++. Feels a bit less snappy than Ink, but it makes up in all things with its immense feature-set. Seriously fun building apps of all kinds with this lib.

behnamoh 2 hours ago | parent | prev [-]

it has, but python being single threaded (until recently) didn't make it an attractive choice for CLI tools.

example: `ranger` is written in python and it's freaking slow. in comparison, `yazi` (Rust) has been a breeze.

Edit: Sorry, I meant GIL, not single thread.

ashirviskas 2 hours ago | parent [-]

> it has, but python being single threaded (until recently) didn't make it an attractive choice for CLI tools.

You probably mean GIL, as python has supported multi threading for like 20 years.

Idk if ranger is slow because it is written in python. Probably it is the specific implementation.

behnamoh 21 minutes ago | parent [-]

Even my CC status line script enjoyed a 20x speed improvement when I rewrote it from python to rust.