import multiprocessing
import msvcrt
import time
run = True
def ticker():
while 1:
time.sleep(1)
print('Тик')
time.sleep(1)
print('Так')
if __name__ == "__main__":
multiprocessing.freeze_support()
multiprocessing.Process(target=ticker, daemon=True).start()
while run:
ch = msvcrt.getch()
if ch == b'\x1b': exit()