def main(): Bot.load() bot = Bot_Template() try: import waitress waitress.serve(bot.application) finally: bot.close()
def __init__(self, name = None): Bot.__init__(self, name)
def routes(self): return Bot.routes(self) + [ (("GET", "POST"), re.compile("^/api/clear$"), self.clear) ]
def __init__(self, name = None): Bot.__init__(self, name) self.shelve = shelve.open( os.path.join(settings.DATA_DIR, "dummy.shelve"), writeback = True )