def api(): if request.environ.get('wsgi.websocket'): ws = request.environ['wsgi.websocket'] while True: in_message = ws.receive() print "MESSAGE RECEIVED:", in_message WebCom.webtoEnaml(json.loads(in_message), ws) return
def _update_web(self, change): from web_com import WebCom WebCom.enamltoWeb(change)