Windows Console Colors

Bill Walker kwalker at earth1.net
Wed Jan 15 20:13:24 EST 2003


Here is a nifty solution to changing the console color when running python
in the interactive mode:

First, copy and paste the following debug program into an editor and save it
as "bluyel.scr":

=================================================
n bluyel.com
e 0100 B4 12 B3 10 CD 10 B8 40 00 8E D8 B8 00 06 B7 1E
e 0110 29 C9 B6 18 80 FB 10 74 04 8A 36 84 00 8A 16 4A
e 0120 00 FE CA CD 10 B4 02 8A 3E 62 00 29 D2 CD 10 C3
rcx
0030
w
q

=================================================

Make sure there is a CR at the end of the q on the last line.

Then run at the dos prompt:

debug < bluyel.scr

this will create a bluyel.com program. Copy it to the python directory.

Then cut and paste the following .bat file into your editor and save it to
the python directory as runPY.bat:

================
@echo off
mode con lines = 43
bluyel
python
================

Double-clicking on runPY.bat withh run a batch file that sets the console to
43 lines and sets the text
to yellow characters on a blue background. Then it runs the python
interpreter. All console i/o will
be yellow on blue, much better than the boring white on black that are the
default colors.

If you want different colors, change the last byte on the first e line in
the debug file. 1E  = 1 for blue bg plus E
(14) for yellow fg.


         0  -  black                   8  -  dark gray
         1  -  blue                    9  -  light blue
         2  -  green                  10  -  light green
         3  -  cyan                   11  -  light cyan
         4  -  red                    12  -  light red
         5  -  magenta                13  -  light magenta
         6  -  brown                  14  -  yellow
         7  -  white                  15  -  bright white








-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----




More information about the Python-list mailing list