So I have following code:
def timee():
time.sleep(5)
f = open("input.txt")
lines = f.readlines()
intimetxt = lines[0]
now = datetime.now()
currenttime = now.strftime("%H:%M")
if currenttime == intimetxt:
start()
if not currenttime == lines[0]:
timee()
timee()
It should read a sertain time from a .txt file and if the time is the current time it should call another function. My problem is that even if the time is the same, it won't call the function.
Hope somebody can help me out:)
Aucun commentaire:
Enregistrer un commentaire