Python,
pasted
on May 11:
|
import struct
import ctypes
import binascii
buf = ctypes.create_string_buffer(16)
struct.pack_into("=I=I=I", buf, 0, 1, 2, 3)
print binascii.hexlify(buf)
|
Output:
|
Traceback (most recent call last):
Line 6, in <module>
struct.pack_into("=I=I=I", buf, 0, 1, 2, 3)
File "/usr/lib/python2.5/struct.py", line 74, in pack_into
o = _compile(fmt)
File "/usr/lib/python2.5/struct.py", line 39, in _compile
s = Struct(fmt)
struct.error: bad char in struct format
|
|