picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Fri Sep 02, 2016 2:55 pm

I decided to split this from the previous topic: viewtopic.php?f=15&t=669

picotui is lightweight, pure-Python Text User Interface widget toolkit with minimal dependencies. It's intended to be run with both MicroPython (unix port) and CPython3. https://github.com/pfalcon/picotui

Below is a screenshot of what kind of UI can be created with picotui:

Image
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Fri Sep 02, 2016 2:55 pm

The latest release, 0.8, adds initial support for menus.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

torwag
Posts: 207
Joined: Fri Dec 13, 2013 9:25 am

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by torwag » Thu Sep 22, 2016 1:40 pm

Hi pfalcon,
Since you wrote unix port I am confused here. Would this also run via an ssh/telnet session on a micropython board?
Thanks

pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Thu Sep 22, 2016 1:57 pm

I don't know, you can try and share your experiences. But this projects is on biggish side, intended to provide real-world usable UI, not run in very small heap. Folks interested in minimalistic implementation intended to run, and running, on boards, may follow the thread linked from the top message.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

danielm
Posts: 157
Joined: Mon Oct 05, 2015 12:24 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by danielm » Fri Sep 30, 2016 7:10 am

pfalcon, I wanted to try picotui on WiPy port, but the module uses decimal numbers as I did get following message:

Code: Select all

>>> from picotui.context import Context
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/flash/lib/picotui/context.py", line 1, in <module>
  File "/flash/lib/picotui/screen.py", line 206
SyntaxError: decimal numbers not supported
Not sure if decimals are used in other places of the code. Do you think that the module could be rewritten with integers only?

pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Fri Nov 24, 2017 8:57 am

Picotui 0.9.2 was released: https://pypi.python.org/pypi/picotui/0.9.2
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
Roberthh
Posts: 1398
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by Roberthh » Fri Nov 24, 2017 10:41 am

Hi pfalcon,
Since you wrote unix port I am confused here. Would this also run via an ssh/telnet session on a micropython board?
Thanks
I have used a subset of the picotui on ESP8266, just radiobuttons and simple text fields, for the configuration of an application. That works well. The full package is too large for the small heap, and even with the subset I had to run the Picotui and the other app alternatively. It did not work with webrepl. As soon as the picotui starts, the webrepl session is closed. I did not look into that further, since USB was sufficient in that case.

pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Sat Dec 09, 2017 10:04 am

Picotui 0.9.3 was released: https://pypi.python.org/pypi/picotui/0.9.3
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1154
Joined: Fri Feb 28, 2014 2:05 pm

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by pfalcon » Sat Feb 17, 2018 11:23 am

picotui 1.0 released: https://pypi.python.org/pypi/picotui/1.0 . This release features refactorings and cleanups for technical debt accumulated, apps may need adjustments: https://github.com/pfalcon/picotui/issu ... nge%22+1.0
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
Roberthh
Posts: 1398
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: picotui - Text User Interface (TUI) library for MicroPython (and CPython)

Post by Roberthh » Sat Feb 17, 2018 11:42 am

Thanks. I'm using picotui in an application and it is a great help.

Post Reply