def write_to_ofd(base64_ofd_string, output_path):
# 解码Base64字符串
decoded_data = base64.b64decode(base64_ofd_string)
# 指定文件名和路径来保存OFD文件
file_name = output_path
# 将解码后的数据写入到OFD文件
with open(file_name, 'wb') as ofd_file:
ofd_file.write(decoded_data)
print(f'OFD文件已保存为: {file_name}')
# base64_str,通过接口请求或者文件读取出来作为参数放到参数1,参数2导出的ofd路径+名称
write_to_ofd(base64_str, "output.ofd")
python根据base64生成ofd文件
最新推荐文章于 2024-11-21 14:10:03 发布
1万+

被折叠的 条评论
为什么被折叠?



