By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,427 Members | 1,354 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,427 IT Pros & Developers. It's quick & easy.

Print message with Colors

P: n/a
prk
Hi Folks,

Is there any procesure for print messages with colors.
Ex: print "Welcome"
Comment: Here i want to see the welcome message in Red Color.

Regards,
Ram

Jan 11 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
prk a écrit :
Hi Folks,

Is there any procesure for print messages with colors.
Yes, see:

http://www.google.fr/search?q=python+print+color
http://groups.google.fr/groups?as_q=...mp.lang.python
See also ANSI escape sequences for the more general subject of color
printing on terminals.

Jan 11 '07 #2

P: n/a
On 2007-01-11, Laurent Pointal <la*************@limsi.frwrote:
prk a écrit :
>Hi Folks,

Is there any procesure for print messages with colors.

Yes, see:

http://www.google.fr/search?q=python+print+color
http://groups.google.fr/groups?as_q=...mp.lang.python

See also ANSI escape sequences for the more general subject of
color printing on terminals.
If you're using Windows NT, 2000, or XP don't bother reading
about ANSI escape sequences. They will not work at all with
Python on those platforms, even if you use the crummy old
COMMAND.COM. I believe it's because Python on those platforms in
a console application, which on NT, 2000 and XP doesn't support
ANSI escape sequences. It makes IPython's appearance less cool. :-(

Try http://effbot.org/downloads/#console for color output that
works.

--
Neil Cerutti
We're going to be exciting. Of course, it was exciting when the Titanic went
down. --Bob Weiss
Jan 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.