Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

modify a running python program

I launched a python program with many nested loops, and the program will take days. I just realized that one of the loops values is wrong and makes a infinite loop.

I don't want to restart the program from zero, is there a way to interrupt the current program and modify the loop range so it will work properly and also if it was trapped with the infinite loop to break it?

Many thanks for your help.

like image 775
user1479498 Avatar asked Jun 25 '12 09:06

user1479498


1 Answers

If the program saves its state or its results from time to time, you could add a logic which skips the steps which have already executed.

Otherwise, I don't see a way to change this.

like image 117
glglgl Avatar answered Sep 21 '22 16:09

glglgl