[Tutor] ANSI / VT100 Escape Codes in Windows 7 Environment

boB Stepp robertvstepp at gmail.com
Wed Feb 27 21:40:13 EST 2019


On Wed, Feb 27, 2019 at 6:50 PM Chip Wachob <wachobc at gmail.com> wrote:
>
> Hello again,
>
> As always, this list has been very helpful, and thank you.
>
> So, I thought I was good to go until I attempted to run my code on a
> Windows 7 vintage machine this morning.  The application is intended to be
> run in the command window in Windows, from the terminal in Linux...
>
> In the code I had included the ANSI escape characters so I could invert the
> text and change the color.  Basically, I wanted to make the warning / error
> messages stand out from the crowd.

As I have been on a "curses" kick lately, I wonder if it would work
for you?  Of course this means another module, but it is in the
standard lib on all non-Windows Python versions.  For Windows I found
this thread on stackoverflow:

https://stackoverflow.com/questions/32417379/what-is-needed-for-curses-in-python-3-4-on-windows7

The checked answer gives a link to binaries for Windows, which seems
to support all Python versions through 3.7, including 2.7.

Just a thought...

-- 
boB


More information about the Tutor mailing list