import sys import time from tkinter import filedialog def texttime(words): "Takes a text and shows it a caracter for 0.07 seconds" for c in words: sys.stdout.write(c) sys.stdout.flush() if c != " ": time.sleep(0.07) name = filedialog.askopenfilename() with open(name, "r", encoding="utf-8") as file: file = file.read() texttime(file)