Message169771
Starting with the example in memoryview documentation:
>>> from ctypes import BigEndianStructure, c_long
>>> class BEPoint(BigEndianStructure):
... _fields_ = [("x", c_long), ("y", c_long)]
...
>>> point = BEPoint(100, 200)
>>> a = memoryview(point)
I am trying to unpack the resulting view:
>>> a.tolist()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NotImplementedError: memoryview: unsupported format T{>l:x:>l:y:}
>>> struct.unpack_from(a.format,a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: bad char in struct format
>>> struct.unpack_from('>ll',a)
(0, 100)
It looks like there is one or more bugs in play here. |
|
Date |
User |
Action |
Args |
2012-09-03 16:24:57 | belopolsky | set | recipients:
+ belopolsky, skrah |
2012-09-03 16:24:57 | belopolsky | set | messageid: <1346689497.87.0.0543181973017.issue15857@psf.upfronthosting.co.za> |
2012-09-03 16:24:57 | belopolsky | link | issue15857 messages |
2012-09-03 16:24:57 | belopolsky | create | |
|