示例#1
0
def main():
    Bot.load()
    bot = Bot_Template()

    try:
        import waitress
        waitress.serve(bot.application)
    finally:
        bot.close()
示例#2
0
 def __init__(self, name = None):
     Bot.__init__(self, name)
示例#3
0
 def routes(self):
     return Bot.routes(self) + [
         (("GET", "POST"), re.compile("^/api/clear$"), self.clear)
     ]
示例#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
     )