[Twisted-Python] how to get an idle callback while running a reactor?

2008-12-20 Thread Joe Strout
I'm trying to make a simple AIM bot that, in addition to responding when I talk to it, can also send me a message on its own initiative. My code is based on SkippyTalkBot [1], but I confess that I don't understand it very well, and though I've been crawling the Twisted documentation for a few

Re: [Twisted-Python] how to get an idle callback while running a reactor?

2008-12-20 Thread Joe Strout
Jean-Paul Calderone wrote: So I'm at a loss as to how to add an "idle" function that will allow my bot to periodically see whether it has something new to say to the user. While this sometimes makes sense, it's usually *not* the approach you want to take. You're describing a solution which i

Re: [Twisted-Python] how to get an idle callback while running a reactor?

2008-12-20 Thread Joe Strout
Christopher Armstrong wrote: Just because you have a number of sources doesn't mean you intrinsically can't use them in an efficient, event-oriented manner. No, but when these "sources" as you call them are external data sources that I have to periodically check (have to -- there is no way to