Python IRC bot using Twisted

Jean-Paul Calderone exarkun at
Tue Jul 3 15:55:29 CEST 2007

On Tue, 03 Jul 2007 13:44:34 -0000, ddtm < at> wrote:
>On 3    , 16:01, Jean-Paul Calderone <exar... at> wrote:
> [snip]
>Thank you very much! It's a very useful information. One more
>question: can I cancel the DelayedCall using its ID (it is returned
>from callLater(...)) from another function? In example bot there are
>two functions:
>def joined(self, channel):
>  ...
>def privmsg(self, user, channel, msg):
>  ...
>For example, I add callLater(...) to joined(...) function and I'd like
>to cancel this in privmsg(...) function. What should I do?

Yep.  The object callLater returns has a `cancel' method (some others, too)
which will prevent the function from being called at the scheduled time.


More information about the Python-list mailing list