2024-04-29 17:13:26 -04:00
|
|
|
import sys
|
|
|
|
|
|
|
|
def eprint(*args, **kwargs):
|
|
|
|
print(*args, file=sys.stderr, **kwargs)
|
|
|
|
|
|
|
|
def input_print(p, default = ""):
|
|
|
|
eprint("\033[93m" + p, end=':\033[0m ', flush=True)
|
|
|
|
inp = input("")
|
|
|
|
if inp:
|
|
|
|
return inp
|
|
|
|
else:
|
|
|
|
if not default:
|
|
|
|
return input_print(p, default)
|
|
|
|
return default
|
|
|
|
|
|
|
|
def green_print(p):
|
2024-05-29 13:52:33 -04:00
|
|
|
eprint("\033[92m" + p + "\033[0m")
|
|
|
|
|
|
|
|
def red_print(p):
|
|
|
|
eprint("\033[31m" + p + "\033[0m")
|