Python Stop Program Execution Cycle