While loop

Marco Mariani marco at sferacarta.com
Thu Mar 5 12:23:38 EST 2009


Fab86 wrote:

> Is it possible to get the program to catch the exception, wait 10
> seconds, then carry of from where it was rather than starting again?


something like this? probably works in PASCAL as well :)

> i=0
> while i < len(stuff):
>    try:
>       do_with(stuff[i])
>    except SomeError:
>       sleep(10)
>       continue
>    i+=1




More information about the Python-list mailing list