how to stop raise exception from quitting the program python code example Example: exit python script import sys sys.exit()