你可以使用以下代码将bytebuffer读取为字符串形式:

import numpy as np

# 假设bytebuffer是一个numpy数组
bytebuffer = np.array([91, 45, 49, 44, 32, 54, 44, 32, 48, 44, 32])

# 将bytebuffer转换为字符串形式
string_form = str(list(bytebuffer))

print(string_form)

输出结果将是:

'[91, 45, 49, 44, 32, 54, 44, 32, 48, 44, 32]'
将butebuffer读取为字符串形式如91 45 49 44 32 54 44 32 48 44 32

原文地址: https://www.cveoy.top/t/topic/hQ75 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录