fixbot/example.py
author Tero Marttila <terom@fixme.fi>
Fri, 05 Feb 2010 21:48:14 +0200
changeset 58 31a17b0b5159
parent 21 aa6df8f9c44a
permissions -rw-r--r--
remove concept of event_types, the event.type is now just sent as a string
from twisted.internet import protocol, reactor
from twisted.python import log
import sys

import api

class ExampleModule (api.Module) :
    name = "example"
    version = 0x0001
    
    def handleConnect (self) :
        self.sendEvent("example", "this is an example event")
        self.disconnect()

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