Tiny fixes

This commit is contained in:
Ferit Yiğit BALABAN 2022-07-16 01:39:56 +03:00
parent d27af2d15a
commit c701566490

View File

@ -10,7 +10,7 @@ from subprocess import run
IMG_LOC = '/home/ferit/sources/neco.png' IMG_LOC = '/home/ferit/sources/neco.png'
def clr(text): def clr(text: str):
dump = '\u001b[30m█\u001b[31m█\u001b[32m█\u001b[33m█\u001b[34m█\u001b[35m█\u001b[36m█\u001b[37m█' dump = '\u001b[30m█\u001b[31m█\u001b[32m█\u001b[33m█\u001b[34m█\u001b[35m█\u001b[36m█\u001b[37m█'
frame = '\u001b[31m' frame = '\u001b[31m'
info = '\u001b[32m' info = '\u001b[32m'
@ -55,14 +55,14 @@ def clr(text):
iter = jump_to iter = jump_to
print(' ', end='') print(' ', end='')
elif clr_dict.__contains__(char): elif clr_dict.__contains__(char):
print(f'{clr_dict[char]}{char}\u001b[0m', end='') print(f'{clr_dict[char]}{char}\u001b[0m', end='')
else: else:
print(char, end='') print(char, end='')
iter += 1 iter += 1
print('') print('')
def read_until_space(text, start_at): def read_until_space(text: str, start_at: int):
buffer = '' buffer = ''
iterator = start_at iterator = start_at
while text[iterator] != ' ': while text[iterator] != ' ':