def main(): logging.basicConfig(level=logging.DEBUG) Plugin.load() line = readline() while line: for plugin in Plugin.plugins: on_message = getattr(plugin, "on_message") response = plugin.on_message({'text':line, 'speaker_id':1, 'room':'test'}) if response: print(response) line = readline()
def main(): logging.basicConfig(level=logging.DEBUG) Plugin.load() line = readline() while line: for plugin in Plugin.plugins: on_message = getattr(plugin, "on_message") response = plugin.on_message({ 'text': line, 'speaker_id': 1, 'room': 'test' }) if response: print(response) line = readline()
def main(): Plugin.load() application = webapp.WSGIApplication([('/handler', LingrvantHandler), ('/(.*)', LingrvantHomepage)], debug=True) wsgiref.handlers.CGIHandler().run(application)