[Tutor] Clearing the screen from the terminal

Cameron Simpson cs at cskk.id.au
Sun Oct 25 21:32:20 EDT 2020


On 25Oct2020 07:29, Cranky Frankie <cranky.frankie at gmail.com> wrote:
>Agreed about negative aspects of clearing the screen. But there is a
>reason. I'm doing version 1 of this program as terminal based, yet still
>Model View Controller. My hope is that, once it works in the terminal, I
>can then move the View part to PySimplegui without too much trouble. So
>those screen redraws will turn into GUI lists that get refreshed.

Then you probably want Alan's approach, and use curses. You can write
MVC style with it, and should aid the shift to PySimplegui later (not to
mention maybe supporting mixed mode, where you can run in terminal mode
if there is no GUI, such as when sshed into a host).

I think Alan even has an introductory document for going this way.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Tutor mailing list