Re: Resuming a program's execution after correcting error



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.

Afaik, the best you can do is run the script with "python -i", which
will give you an interactive prompt from which you have access to the
module-level variables. Or even better, test your script with small
data sets, and do the real calculations only after you've fixed any
obvious bugs.

.



Relevant Pages

  • Re: Executing python script stored as a string
    ... how to execute a python script stored as a string? ... You can pass in a global and local namespaces to exec as arguments: ... the script in string should behave just like any other ordinary python ... If you want it to execute in a separate *process*, ...
    (comp.lang.python)
  • Re: [SLE] sa-learn on server (Postfix/Procmail/Cyrus)
    ... multiple users is that one person's spam is another person's ham. ... Here is the script. ... First is the small shell script that calls the python script: ... Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com ...
    (SuSE)
  • Re: using subprocess module in Python CGI
    ... I am a Python Newbie and would like to call a short python script via ... retval = subprocess.call(comd, 0, None, None, outptr, errptr) ...
    (comp.lang.python)
  • Re: how to modify text in html form from python
    ... the html page is separate from the python script, ... My goal is to be able to exchange data between the server and the client ... You needed to surround the html with quotes to make it a string, ...
    (comp.lang.python)
  • Re: using subprocess module in Python CGI
    ... I am a Python Newbie and would like to call a short python script via ... browser using a CGI script, but initially I am trying to call the same ... retval = subprocess.call(comd, 0, None, None, outptr, errptr) ...
    (comp.lang.python)