def update(): getDesktop().draw() getDesktop().update() r, w, e = Network.multiplex() for sock in r: try: sock.handleInput() except Exception, exc: print "Unhandled exception:", exc
def run(): while running: r, w, e = Network.multiplex(1) for sock in r: try: sock.handleInput() except Exception, exc: if (exc.__class__ != 'socket.error'): print "Unhandled exception:", exc for sock in w: sock.handleOutput() for sock in e: sock.close()
def run(): while running: r, w, e = Network.multiplex(1) for sock in r: try: sock.handleInput() except Exception, exc: if exc.__class__ != "socket.error": print "Unhandled exception:", exc for sock in w: sock.handleOutput() for sock in e: sock.close()