I have a python script and I want to be able to stop it at any time.
If I knew where in the script I may want to stop it I would use quit().
Is there a way to implemet this independent of the current state?
Background: This script runs in a docker container and if I want to stop that container it takes a rather long time to do so and exits with code 137. This bothers me.