Re: Shutting down twisted reacotr

2005-04-28 Thread Jason Mobarak
You might not need threads to get user input from the console. Jp posted this in response to a similar query on the twisted-python mailing list: http://article.gmane.org/gmane.comp.python.twisted/9019 -- http://mail.python.org/mailman/listinfo/python-list

Re: Shutting down twisted reacotr

2005-04-28 Thread Jp Calderone
On Thu, 28 Apr 2005 12:34:33 + (UTC), Operation Latte Thunder <[EMAIL PROTECTED]> wrote: Jason Mobarak <[EMAIL PROTECTED]> wrote: Why do you want to do this in a thread? What's wrong with reactor.callLater? import time from twisted.internet import reactor def shutdown(): time.sleep(3) pr

Re: Shutting down twisted reacotr

2005-04-28 Thread Operation Latte Thunder
Jason Mobarak <[EMAIL PROTECTED]> wrote: > Why do you want to do this in a thread? What's wrong with > reactor.callLater? > > import time > from twisted.internet import reactor > > def shutdown(): > >time.sleep(3) >print "stopping" >reactor.callFromThread(reactor.stop) > > reactor.

Re: Shutting down twisted reacotr

2005-04-27 Thread Jason Mobarak
Why do you want to do this in a thread? What's wrong with reactor.callLater? import time from twisted.internet import reactor def shutdown(): time.sleep(3) print "stopping" reactor.callFromThread(reactor.stop) reactor.callInThread(shutdown) reactor.run() -- http://mail.python.org/

Shutting down twisted reacotr

2005-04-27 Thread Operation Latte Thunder
I have a simple ( I hope ) problem that I have been baning my head against all day. I have isolated it down to a very small demo script, which I will include below. Basically, I want to have twisted run until an event makes it stop. My problem is that my reactor.stop() doesn't seem to do anything