I am writing a program in python that requires the program to constantly run in the background with the option of the user typing at any time to pause the program or end it.
So far I can only get the program to completely stop and wait for the user to enter something.
uInput = ""
counter = 3
while uInput != "password" and counter >= 0:
uInput = input
if uInput != "password":
print("Incorrect Password.", counter, "tries remaining.")
counter -= 1
The input statement completely freezes the program until the user presses enter. Is it possible to have the program run for example a timer or just another program in general while it waits for the user to input something? Any tutorials or tips will be helpful.