def do_GET(self): qd = self.parse_path() if not qd: return outd = BackendTool.run_op(qd) try: data = json.dumps(outd, ensure_ascii=False) if 'callback' in qd: data = '%s(%s);' % (qd['callback'], data) self.reply_to_GET(data, 'application/json') except Exception as e: print 'qd', qd print 'outd', outd print e data = e return
def start(plist, host, port): if not BackendTool.load_projects(plist): sys.exit(-1) SeascopeServer.start_server(host, port)