changing color on the command prompt

Peter Hansen peter at engcorp.com
Thu Aug 28 18:13:04 EDT 2003


Hank wrote:
> 
> I meant the prompt for Windows operating system C:>. And by error
> messages i just mean printouts like
> print "Error in Process"
> 
> If its just an environment variable, i should be able to change it,
> print it out and change it back to the original color right?
> 
> Anyone know which variable i have to modify?

It's not a variable, and now that you've clarified what you mean
(as near as I can tell it has nothing to do with the prompt itself,
which is the text that is displayed in the console *after* your 
program has terminated, in the case of Windows the C:\> thing)
I can safely say you need to follow this advice:

> Peter Hansen <peter at engcorp.com> wrote in message news:<3F4D34C5.150FD96E at engcorp.com>...
> > If you mean the console text color, check the archives for the last couple
> > of days for responses to a similar question (search for "ansi.sys" perhaps).

The key is having the ANSI.SYS driver installed, so if you want this to work
for anyone using your program, you may be out of luck since most don't have
it running.  (I think... others are more expert in this area.)

-Peter




More information about the Python-list mailing list