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
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
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.
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/
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