Exemplo n.º 1
0
def main():
    Bot.load()
    bot = Bot_Template()

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