Can’t stop my script, really annoying
for item in range(200):
except BaseException as ex:
if name == 'main':
#My script is like this, it keeps running, I can’t stop it, really really annoying.
Well silly, you are catching every exception, including KeyboardException, and pausing 3 seconds at a time for 200 runs through the loop.
You script will stop in 600 seconds, or in about 10 minutes. What were you expecting to happen? You can force quit pythonista, and start over.
In the future, catch Exception, not BaseException, if you want the "X" button to still work. Even better, catch what you need, not all exceptions, unless you are running some sort of server that needs to just log unexpected occurances and stay alive. That is called an "anti-pattern" that will make it hard for you to debug things.