On Thu, Nov 15, 2018 at 01:18:16PM +0000, John Blower wrote:
> I try to create colour text by using these two  modules , only returns the 
> colour code, no colour text.
> How to solve this problem.

Use a terminal that supports colour codes.

 
> >>> import termcolor
> >>> import colorama
> >>> colorama.init()
> >>> termcolor.cprint('Hello World','red')
> [31mHello World[0m

What platform are you using?

What terminal are you using?

What terminals does termcolor support?

What does the documentation for termcolor say?



-- 
Steve
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to