This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients giampaolo.rodola, josiah.carlson, josiahcarlson, nirs, r.david.murray
Date 2010-08-26.16:19:48
SpamBayes Score 0.017867891
Marked as misclassified No
Message-id <1282839592.68.0.629507252463.issue9693@psf.upfronthosting.co.za>
In-reply-to
Content
This can be useful in those circumstances where the user wants to execute some action right after some data has been sent (push()) or a producer has been consumed (push_with_producer()).
Example:


def log(msg):
    logging.debug(msg)

class Sender(asynchat.async_chat):

    def __init__(self, conn):
        asynchat.async_chat.__init__(self, conn)
        self.set_terminator("\r\n")
        self.push("220 hello\r\n")
        self.push_callable(log, "hello has been sent")
History
Date User Action Args
2010-08-26 16:19:52giampaolo.rodolasetrecipients: + giampaolo.rodola, josiahcarlson, nirs, josiah.carlson, r.david.murray
2010-08-26 16:19:52giampaolo.rodolasetmessageid: <1282839592.68.0.629507252463.issue9693@psf.upfronthosting.co.za>
2010-08-26 16:19:51giampaolo.rodolalinkissue9693 messages
2010-08-26 16:19:50giampaolo.rodolacreate