When I use the less
command in my Mac terminal, I show 23 line slices of the specified file. If I go down the file, then scroll in the terminal window, I donβt see any file contents in front of the current fragment. Instead, I see the commands I typed before using less
.
I would like to use this or similar effect to create an ascii game interface that only shows the current screen with no history. I would draw my frames on the screen and change only the text or parameters in these frames. This is very common on older systems that work mostly or completely in a command line environment.
Is there a Python module that offers this? Is this an effect that I can or must realize myself?
Here are some examples of screen elements that can benefit from this effect.
+-------------------------------------------------------------------+ | | | Dialog dialog dialog dialog dialog dialog dialog dialog dialog | | dialog dialog dialog dialog dialog dialog dialog dialog dialog | | dialog dialog dialog dialog dialog dialog dialog dialog dialog | | dialog dialog dialog dialog dialog dialog dialog dialog dialog | | dialog dialog dialog dialog. | | | | | | | +--------------------+---------------+------------------------------+ | Attack | South | HP/Max MP/Max | | > Cast Magic | - | Tom: 120/120 60/91 | | Use Item | New | > Dick: 27/133 47/47 | | Tactics | Schwartzton | Harry: 87/104 16/113 | +--------------------+---------------+------------------------------+
source share