I tried writing a TUI stack window in Python. This wasn't too bad overall, but it would be a lot simpler if the Python TUI code could automatically handle clipping text (as opposed to letting it wrap, which happens now), and also scrolling. This could be an option on TuiWindow so that window implementations could request this behavior.
The TextWindow class of my locals TUI window [1] took care of this kind of stuff, I just have to give it a list of lines, I use this as base for all my TUI windows. But if the TuiWindow itself did all this, it would be nice too I guess. [1] https://sourceware.org/pipermail/gdb-patches/2021-June/179539.html