[FRPythoneers] Signal Interrupt

Sean Reifschneider jafo at tummy.com
Mon Aug 28 09:06:43 MDT 2000

On Sun, Aug 27, 2000 at 10:12:01PM -0600, PC Drew wrote:
>perfect!  It solves my problem!  Oh wait...this is in Python!  So, 
>how do I fix this in my Python program?

I usually do something like:

	try: (r,w,e) = select.select (r,w,e, timeout)
	except select.error: continue

though depending on the structure of your code you may want a "pass"
or a "return" in place of the continue.  Or you could do:

	while 1:
			(r,w,e) = select.select (r,w,e, timeout)
		except select.error: continue

as a kind of drop-in replacement for that one line.  It'll depend on the
structure of what you're doing as to which may be the most appropriate.
But that should give you the idea.

 Language is the most important .. uh..  I think you know what I'm trying
 to say.  -- Steve Martin
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python

More information about the FRPythoneers mailing list