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
constrained_client.py 文件源码
python
阅读 47
收藏 0
点赞 0
评论 0
评论列表
文章目录