You are viewing a single comment's thread from:

RE: Leeching Arseholes!

in #python5 days ago

Good read. Nice little teaser for azicon's post on the Splinterlands community too. I'll look forward to that.

Completely beside the content here, but what are you using to color the terminal output? (please say its some simple python package!) The terminal in the cover-photo looks very cool!

Sort:  

That's quite easy, and this works on Windows, but I am unsure about other OS's.

import os

os.system("")

# StdOut console colour definitions
class bcolors:
     HEADER = '\033[95m'
     BLUE = '\033[94m'
     CYAN = '\033[96m'
     GREEN = '\033[92m'
     YELLOW = '\033[93m'
     VIOLET = '\033[35m'
     RED = '\033[91m'
     END = '\033[0m'
     ORANGE = '\033[38;5;208m'
     WHITE = '\033[97m'

print(bcolors.RED + f" No recent content found for account {account} found, no vote for you!" + bcolors.END)

...use f' strings.. with the colour at the start, and .END to reset it at the end of the line. Makes it look a lot more appealing!