How robust is Python ?

Sandipan Gangopadhyay sandipan at vsnl.com
Fri Jan 12 10:35:00 EST 2001


----- Original Message -----
From: "Moshe Zadka" <moshez at zadka.site.co.il>
To: <rturpin at my-deja.com>
Cc: <python-list at python.org>
Sent: Saturday, January 06, 2001 4:09 PM
Subject: Re: How robust is Python ?

> On Fri, 05 Jan 2001, rturpin at my-deja.com wrote:
>
> > Unfortunately, cron is not cross-platform. We'll have
> > some sort of mechanism to do this. The problem is not
> > just the language and operating system, but everything
> > that can kill a process. Still .. you want such mechanism
> > as backup, not as a solution to regular crashes.
>
> Of course. None of this is meant to imply Python crashes regularily.
> In fact, I can't think off-hand of a language less likely to suffer
> crashes, given that you take a few exception-catching precautions
> in the main loop (have a catch-all except: which re-execs the process).

I want this in my code, but came across a problem -

while binAliveMarker:
  if binIWannaStartAgain:
    time.sleep(1)
    continue
  work code ...

If I try a catch-all except, continue hits except on the outer level rather
than while. Probably the reason that it results in syntax error.

while binAliveMarker:
  try:
    if binWannaStartAgainLater:
      time.sleep(1)
      continue
    work code ...
  except:
    pass

Any suggestions to make it work with continue (or an alternative) ? Apart
from removing continue completely by making the work code inside an else ?

Thanks,

Sandipan

> --
> Moshe Zadka <sig at zadka.site.co.il>
> This is a signature anti-virus.
> Please stop the spread of signature viruses!
>
> --
> http://www.python.org/mailman/listinfo/python-list
>






More information about the Python-list mailing list