OrderAndChaos
OrderAndChaos

Reputation: 3860

Make a full terminal window application like Vim/Mutt/Cmus

I'm not sure quite how to word this, which is probably why I'm having trouble finding an answer.

I have a command line script that runs a rummy game, I want it to take over the terminal kind of like how Vim or Mutt does, so that each round is refreshed in the full terminal window rather than just printing out row after row of text.

Can someone tell me what that is called, so I can research it and find out how to do it?

Repo: https://github.com/sarcoma/Cards

Upvotes: 2

Views: 1226

Answers (2)

OrderAndChaos
OrderAndChaos

Reputation: 3860

As mentioned in a comment "pythons curses module does what you require".

This is what you need to take over the terminal: https://docs.python.org/3.9/howto/curses.html

Upvotes: 2

Shmygol
Shmygol

Reputation: 933

You're looking for a console user interface. One of the best libraries for python would be http://urwid.org/

Upvotes: 1

Related Questions