stop python script with pyphon code example Example: python stop script some code quit() # quit at this point some more code (that's not executed)