def main(): while True: print(line()) if os_release() == '7': pass else: check_new_ver() send = xinput(c.BLUE + ">" + c.GREEN + ">" + c.RED + "> " + c.CYAN) if send == 'c': if_c() elif send == 'e': if_e() elif send == 'z': if_z() elif send == '1': if_1() elif send == '2': if_2() elif send == '3': if_3() elif send == '4': if_4() elif send == '5': if_5() else: if_else()
def line(): text = "-" * 102 if os_release() == '7': colors = [''] else: colors = [ '\x1b[34m', '\x1b[36m', '\x1b[32m', '\x1b[90m', '\x1b[94m', '\x1b[96m', '\x1b[92m', '\x1b[95m', '\x1b[91m', '\x1b[97m', '\x1b[93m', '\x1b[35m', '\x1b[31m', '\x1b[39m', '\x1b[37m', '\x1b[33m' ] colored_chars = [choice(colors) + char for char in text] rand_line = ''.join(colored_chars) return rand_line
from platform import release as os_release from pathlib import Path from os.path import isfile home = str(Path.home()) if os_type().upper() == 'WINDOWS': if isfile(home + '\\.CGT\\files\\LANGUAGE'): language = open(home + '\\.CGT\\files\\LANGUAGE', 'r').read() elif os_type().upper() == 'LINUX': if isfile(home + '/.CGT/files/LANGUAGE'): language = open(home + '/.CGT/files/LANGUAGE', 'r').read() else: pass if os_release() == '7': class c: YELLOW = '' BLUE = '' GREEN = '' RED = '' else: class c: YELLOW = '\033[33m' BLUE = '\033[94m' GREEN = '\033[92m' RED = '\033[91m'