12345678910111213141516171819202122232425262728293031323334353637383940 |
- import sys
- icolor = 1
- def cprint(*text,color="blue",space=" ",end="\n"):
-
- if not color:
- print(text)
- return 0
- if color == "green":
- txt = '\033[92m'
- elif color == "red":
- txt = '\033[0;31m\033[1m'
- elif color == "yellow":
- txt = '\033[93m\033[1m'
- elif color == "cyan":
- txt = '\033[96m'
- else:
- txt = '\033[94m'
- for t in text:
- txt += str(t ) +" "
-
-
-
-
-
-
-
-
-
- txt += '\033[0m'
- print(txt,end=end)
-
- try:
- sys.stdout.flush()
- except BrokenPipeError as e:
- print("BROKEN PIPE ERROR CPRINT = EXIT")
-
-
|