Look at your code:
print ("Stopped successfully, you can resume by typing resume")
time.sleep(999999999999999999999999999999999999999999999999999999999999)
if input() == "resume":
The parameter to sleep is the number of seconds to wait before executing the next statement!
That code will wait for 3 * 10
52 years before continuing ... in theory. In practice your computer will have died many, many megayears before that.
You would probably have to look at multithreading your app to do what you want:
multithreading python - Google Search[
^] you will find a lot of info there, but be aware that this is not a novice subject, and you have to think really carefully before converting to a multithreaded app.