constrained_client.py 文件源码

python
阅读 47 收藏 0 点赞 0 评论 0

项目:creator-system-test-framework 作者: CreatorDev 项目源码 文件源码
def Decode(value, type):
    data = base64.standard_b64decode(value)

    print("Decoding value %s, type %s" % (str(value), str(type)))
    sys.stdout.flush()

    if type is int:
        result = struct.unpack("=q", data)[0]
    elif type is float:
        result = struct.unpack("=d", data)[0]
    elif type is str:
        result = str(data)
    else:
        raise EncodeException("Unknown type %s with value %s" % (str(type(value)),str(value),))

    return result
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号