example.py
author Tero Marttila <terom@paivola.fi>
Fri, 21 Mar 2008 01:53:51 +0200
changeset 7 6a49fc285842
parent 3 5ab150c4a328
permissions -rw-r--r--
C module to handle utmp entires

committer: Tero Marttila <terom@paivola.fi>
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()