[Python-Dev] PEP3118, python 2.6

Thomas Heller theller at ctypes.org
Thu Jun 5 17:42:45 CEST 2008


Thomas Heller schrieb:
> I'm currently trying to port the pep3118 ctypes changes which are already in
> the py3k branch to the trunk.
> 
> In py3k the tests for this stuff (in Lib/ctypes/test/test_pep3118.py) use
> the memoryview object which exposes attributes like .format, .shape, .strides
> and so on for objects implementing the new buffer interface.
> 
> In Python 2.6 memoryview does not exist so the question is how to write a test
> that checks for the correct attributes.  My idea is to implement the
> __array_interface__ property for ctypes instances, as described in this document
> http://numpy.scipy.org/array_interface.shtml.

In private email Travis told me that he has no time to backport the memoryview
object to Python 2.6.  Maybe there is someone who could do this (Myself I have
no time either for this)?

Thomas



More information about the Python-Dev mailing list