/ Published in: Python

Quick method for creating coloured tty in python terminal using 'termcolor'
$ pip install termcolor;
$ pip install termcolor;
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
try: import termcolor from termcolor import colored except: print "No colours :(" def p(*args, **kargs): color = kargs.get('color', None) if color and termcolor: for x in args: sys.stdout.write(colored(x, color) + '\n') else: sys.stdout.write(*args)
Comments
