0

I want to check if the user entered a new input, and if not, shut down the script

I've written a small script that is intended to parse certain input, based on a set of rules. I've tried exit(),quit(),and also found to use os._exit(errorcode)

/// The part above assumes the script performed successfully, and it's requesting of the user if it wants to re-run the script, with new input///

print("Enter a new number: ")
time.sleep(15)
s=input()
os._exit(1)
umcn()

The expectation is to have the script wait for user input for 15 seconds, after the print line, and end the script if no new input is given. "umcn()" is a defined function that should execute, if there was any input

0 Answers0