[ create a new paste ] login | about

Link: http://codepad.org/S8nUWMcW    [ raw code | output | fork ]

Python, pasted on May 11:
1
2
3
4
5
6
7
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:
1
2
3
4
5
6
7
8
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


Create a new paste based on this one


Comments: