hhmx.de

Föderation EN Mo 10.06.2024 12:29:04

I want a text-mode-UI (TUI) on my boards. But I could not find curses (or ucurses) that can actually be installed. I tried
`mpremote mip install curses`
which does not work. There is a curses.ascii module, but that does not contain any code, only constants.

Then there is github.com/pfalcon/picotui which looks awesome, but also does not work It requireres a `tty` module which is not available for micropython. Not sure how to solve that.

Does anyone have good resources for that topic?

Föderation EN Di 11.06.2024 12:46:34

@cccpresser picotui is intended to run on the unix port of MicroPython (or the author's fork of MP, PyCopy, which I think has been abandoned?).

Unfortunately I don't know of any curses-like libraries for MicroPython. I have taken a look at porting Textual but it's a lot of work and will require some significant updating.

It would be interesting to see if it would be possible to port curses (currently only curses.ascii is available in micropython-lib)...

Föderation EN Di 11.06.2024 12:50:21

@cccpresser Oh, I've also experimented with using unicode and ansi escape codes, mostly to generate pinout diagrams in the terminal. Here's an example:

gist.github.com/mattytrentini/

A TUI library for MicroPython would be very helpful!

Föderation EN Fr 14.06.2024 16:28:08

@cccpresser MPDisplay is a universal display, event and device driver framework for multiple flavors of Python, including MicroPython, CircuitPython and CPython (big Python). It may be used as-is to create graphic frontends to your apps, or may be used as a foundation with GUI libraries such as LVGL, MicroPython-touch or maybe even a GUI framework you've been thinking of developing - GitHub. github.com/bdbarnett/mpdisplay