Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There isn't really any UI code that follows the zen of python very well. Most of the python zealots I know are kind of ambivalent about UI's in general.

What we would like

* Programmable, discoverable, UIs. I should be able to click a UI element and know what function it calls, or what method it uses.

* Keybindings support, and programmable/configurable keybindings

* A repl, with support for aforementioned

* Ncurses UI using same code base

Right now, we're a long way off from doing python UI's in a way that doesn't feel hacky to the python zealots (like me).



That last one is practically impossible for any but the most simple of applications. It is much easier to reuse a (graphical) UI between desktop and mobile than it is to reuse a GUI with a TUI. TUIs have core differences, from using character cells for positioning and only allowing characters for presenting the UI (i ignore stuff like sixel and regis since those aren't supported by most terminals), to only having a very small selection for colors (again ignoring things like terminals with 256 color support) and a very limited input (often special keys do not work, mouse may or may not work, etc). These things affect greatly the type of UIs you see in terminals - which is also why even today you rarely see terminal applications use the richer UIs that you could find in text based DOS applications in late 80s and early 90s.

But as far for the rest, FWIW, everything you describe seems to be a thing in Blender's UI (including the ability to right click on every actionable element and see what Python function it calls), which probably is kinda expected considering that it was built around Python. Sadly the Blender UI is not something you can use outside of Blender since it is tightly coupled with the rest of the application. There are some attempts to recreate it as a reusable library (e.g. Blendish), but they only go as far as to recreate the look.


Blenders UI is the example at least one python zealot gives.

A tui can use the same keyboard shortcuts, a lot of the same structure, but tender differently.


> * Ncurses UI using same code base

For me this is a huge deal and I wish we saw more of it. There's openSUSE tooling that does this, it looks and behaves similarly on the terminal as it does on the GUI, I was mind blown by this and fully appreciate that level of detail.


Boa Constructor used to do a lot of that, back in the day, and was a pretty good way of making UI apps. I don't think it's still maintained now, unfortunately.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: