petereon / beaupy

A Python library of interactive CLI elements you have been looking for
https://petereon.github.io/beaupy/
MIT License
181 stars 13 forks source link

Better state representation #68

Closed petereon closed 7 months ago

petereon commented 1 year ago

State of the TUI elements provided are beaupy is distributed over entirety of the function body in form of function-scoped variables; This is not pretty.

It could be interesting to store state in form of dictionary, or even a data-class. This should allow for cleaner separation between functionality and interface and maybe even some fancy stuff like resuming the execution of some TUI element while maintaining previous state.