def main(): paras = lib.readParas() files = paras["files"].split("@@") paths = [] for file in files: paths.append(file.split(";")[2]) paras['paths'] = paths func = getattr(sys.modules[__name__], paras['op']) func(paras)
def main(): paras = lib.readParas() func = getattr(sys.modules[__name__], paras['op']) func(paras)
ret.append(copy.deepcopy(data)) if paras.has_key("internal"): return ret else: print json.dumps(ret) def insertElement(paras): cursor = paras["cursor"] sql = "INSERT INTO %s VALUES ('%s', '%s', '%s');" % (paras["table"], paras["id"], paras["label"], paras["path"]) cursor.execute(sql) def dropTable(paras): cursor = paras["cursor"] sql = "DROP TABLE %s" % (paras["table"]) cursor.execute(sql) print "Delete Table Complete" @connectDB def main(paras): func = getattr(sys.modules[__name__], paras["op"]) return func(paras) if __name__ == "__main__": paras = lib.readParas() main(paras)
def main(): paras = lib.readParas() func = getattr(sys.modules[__name__], "kmdn_" + paras['name'].lower()) path = "data/kmdn_" + paras['name'].lower() + ".result" return func(path)