>>> from ctypes import create_string_buffer >>> from struct import pack_into >>> test = create_string_buffer(1) >>> pack_into("B", test, 0, 48) >>> print repr(test.raw) '0'