Resuming a program's execution after correcting error

Georg Brandl g.brandl-nospam at gmx.net
Thu Sep 28 09:42:47 EDT 2006


Sheldon wrote:
> Hi.
> 
> Does anyone know if one can resume a python script at the error point
> after the error is corrected?
> I have a large program that take forever if I have to restart from
> scratch everytime. The error was the data writing a file so it seemed
> such a waste if all the data was lost and must be recalculated again.

As I said before, this can be done by finding out where the error is raised,
what the cause is and by inserting an appropriate try-except-statement in
the code.

There's no way to do that without modifying the code, if the program itself
doesn't offer such an option.

Georg



More information about the Python-list mailing list