fixbot/example.py
author Tero Marttila <terom@fixme.fi>
Wed, 17 Sep 2008 21:10:10 +0300
changeset 28 91800c6af63b
parent 21 aa6df8f9c44a
child 58 31a17b0b5159
permissions -rw-r--r--
typos, and same stuff for fixbot-logwatch
from twisted.internet import protocol, reactor
from twisted.python import log
import sys

import api

class ExampleModule (api.Module) :
    name = "example"
    version = 0x0001
    
    event_types = [
        "example"
    ]

    def handleConnect (self) :
        self.sendEvent("example", "this is an example event")
        self.disconnect()

if __name__ == '__main__' :
    log.startLogging(sys.stderr)
    
    module = ExampleModule()
    reactor.run()