属性访问(或更改);如果您想以NUL结尾的字符串的形式访问它,请使用以下value属性: >>>fromctypesimport*>>>p=create_string_buffer(3)#createa3bytebuffer