Search code examples
pythoncurses

Is there a way to create a separate display and input on the same terminal using curse?


I'd like to code a command line program that result in this UI:

------------
|          |
|     A    |
|__________|
|_____B____|

A is a separate process that loops and displays a list of real time events. It self-refresh.

B is a command prompt. It's fixed at the bottom and got a command history.

I know some command line IRC programs does this so it must be possible.

Bonus point if you can give me a snippet using a Python binding.

I'm aware of this post but I'm kind of lost in the curse documentation.


Solution

  • Enventually I tried to do it with urwid which is way higher level than ncurse.

    I asked a question about it on SO and didn't got more results.

    But eventually I found some FOSS that did just that, I used the source code and made something that worked. You can find the answer in the related question.