编码
import time,os, keyboard
framedist = 3 #x Seconds, not x milliseconds
version = "1.0 prototype"
frames=[]
def frame(action):
print(action)
time.sleep(framedist)
os.system("cls")
def createframe(action):
frames.append(action)
print("WELCOME TO ASCII ANIMATON - prototype")
print(" PRESS ENTER ")
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\nHatcap St.")
keyboard.wait("enter")
os.system("cls")
while True:
print("ANIMATION EDITOR F5: Change framedist")
print("")
不起作用的部分
if keyboard.is_pressed("f5"):
os.system("cls")
framedist = int(input("Enter a number: "))
如果按下 F5,它应该向用户提供输入,但不起作用