Python Forum
Full Screen Text I/O - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Full Screen Text I/O (/thread-13153.html)



Full Screen Text I/O - DavidAlanGay - Sep-30-2018

I just finished an intro to Python course at my local library. I took it so I can write programs for my enjoyment.

Compared with some of the programming languages I've used in my past I.T. career, I am impressed with the power of the Python language. The one thing that I was taken aback on was the lack of native text screen I/O support. Pygame does a great job handling pixel and images but the text handling is clunky at best and some of the font rendering is a bit coarse.

Some of the programs I plan to write will use full screen text I/O in a console, with specific print row/ column placement. I've come across a few screen text-only modules using VT100 output, something I haven't programmed in since my AS/400 days, but I think that's a step backwards.

What module would one recommend to simulate what I'm looking for? I'm in the process of writing my own full screen console output module that uses a list to "print" to and load in its entirety whenever that list is changed. I use an os module call to clear the screen, but that results in an annoying flicker.


RE: Full Screen Text I/O - wavic - Sep-30-2018

Welcome to the forum!

You can try curses module.
Or some 3-th party modules like asciimatics, blessings, npyscreen or blessed.

You may go with the last one and try it. The previous ones are for TUI programming.


RE: Full Screen Text I/O - DavidAlanGay - Oct-02-2018

(Sep-30-2018, 06:00 PM)wavic Wrote: Welcome to the forum!

You can try curses module.
Or some 3-th party modules like asciimatics, blessings, npyscreen or blessed.

You may go with the last one and try it. The previous ones are for TUI programming.

Hi Wavic. Thanks for the welcome.

Curses is the VT100 module I mentioned before. I didn't have the name handy at the time I wrote my original post.

I'll look at the other ones.


RE: Full Screen Text I/O - DavidAlanGay - Oct-24-2018

I've looked into the suggestions given and found varying levels of success with each with the exception of asciimatics which bombs completely. I don't think it can run under 3.7 32bit Python. Supported variations stop at 3.6.

The only solution that works 100% is my own homemade one but the flicker on the console window is damned annoying. I also cannot do color with it.

I really hate to use pygame as I find text placement to be clunky. It would be nice if Python had a more robust STDIN/STDOUT set of commands.


RE: Full Screen Text I/O - wavic - Oct-24-2018

The best thing of all these modules is that you can open the code and modify it as you want. Perhaps if you decide to do it and have any success it will meet your need completely. It's better instead of writing all from the ground up.