[Python-Dev] PEP3118, python 2.6 (original) (raw)

Lisandro Dalcin dalcinl at gmail.com
Thu Jun 5 19:28:36 CEST 2008


On 6/5/08, Thomas Heller <theller at ctypes.org> wrote: Thomas, Iff this helps, you have attached the backport but as an extension module. Sorry, I do not have time for the full backport. But at least, I've found that the Py3K implementation works

You will need to build it with 'python2.6 setup.py build' and copy 'memvwr.so' somewhere in your $PYTHONPATH, then in you 'site.py' or whatever, you can do 'import memvwr; del memvwr' . This will automaticall add the module to the builtin module.

Some notes:

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/testpep3118.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 > arrayinterface property for ctypes instances, as described in this document > http://numpy.scipy.org/arrayinterface.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


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/dalcinl%40gmail.com

-- Lisandro Dalcín

Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 -------------- next part -------------- A non-text attachment was scrubbed... Name: memoryview-py2.6.tar.gz Type: application/x-gzip Size: 6427 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20080605/b1c7df6e/attachment.bin>



More information about the Python-Dev mailing list