예제 #1
0
파일: api.py 프로젝트: iwanttotellyou/gotit
 def POST(self):
     data = web.input()
     _xh = data.xh
     _pw = data.pw
     zheng = ZF(_xh, _pw, "xskbcx")
     json_object = zheng.get_json("xskbcx")
     return json_object
예제 #2
0
파일: api.py 프로젝트: qingtianlvzhou/gotit
 def POST(self):
     data=web.input()
     _xh=data.xh
     _pw=data.pw
     zheng = ZF(_xh,_pw,'xskbcx')
     json_object = zheng.get_json('xskbcx')
     return json_object
예제 #3
0
def zhengfang():
    """
    正方相关操作,直接调用zf类
    返回(viewstate, timd_md5, zf)
    """
    viewstate=None
    start = time.time()
    while viewstate is None:
        #try:
        time.sleep(0.01)
        zf = ZF()
        viewstate, time_md5 = zf.pre_login()
        with mylock:
            temp_clients[time_md5] = (zf, viewstate, time.time())
        #except IOError:
        #    viewstate=None
        #    logger.error('io error can not write to gif')
        #    pass
        if time.time() - start > 10:
            break
    return (viewstate, time_md5, zf)