Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Print in different colors

I am writing a python script that will be run in cmd. How do I make it so that I can specify the color it prints in? Is this possible?

Edit: For everyone reading this. Use this library: pypi.python.org/pypi/colorama
Yes. You have to escape the colors https://misc.flogisoft.com/bash/tip_colo...formatting
(Sep 1, 2017 03:27 PM)Charger Wrote:  Yes. You have to escape the colors

I tried this in Windows CMD, can't get it to work :(


Got it to work! Thanks!
gist.github.com/mlocati/fdabcaeb8071d5c75a2d51712db24011#file-win10colors-cmd


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by ShallowMEFeb 17, 2020 07:08 PM 20 524 Feb 17, 2020 07:08 PM
Last Post: 0xDEAD10CC
[Python] by jailbotJul 15, 2019 06:45 AM 5 217 Jul 15, 2019 06:45 AM
Last Post: jailbot
[Java] by cryptobassboostMay 20, 2019 11:49 AM 4 251 May 20, 2019 11:49 AM
Last Post: bluriy