tkinter asyncore.loop
Tim Lavoie
tjlavoie at mb.sympatico.ca
Tue Sep 17 09:53:33 EDT 2002
>>>>> "Rune" == Rune Hansen <rune.hansen at viventus.no> writes:
Rune> Hello, Some months back I sendt a question to the list where
Rune> I asked if anyone knew how to catch errors in an asyncore
Rune> loop. I got an answer to override the "handle_error" in the
Rune> client. I still can't get
Rune> it to trap any errors though. The error I need to trap is
Rune> "Connection lost". If I remove the network connection and
Rune> try to update the stream
Rune> or post to the socket nothing happens. When I reconect the
Rune> network my application just continues to serve like nothing
Rune> has happened. This is
Rune> of course nice, but not the functionallity I'm looking for.
I tried much the same thing, and never did see much in useful errors
hitting my handle_error, but catching exceptions in handle_read did
the trick. My little app also uses tkinter and asyncore, along with
timeoutsocket. Anyway, the exceptions were caught and used to trigger
the error-handling callback to do the work.
More information about the Python-list
mailing list