extending python with array functions

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Tue Feb 5 08:28:33 CET 2008

On Mon, 04 Feb 2008 20:56:02 -0200, Gabriel Genellina wrote:

> - the array module http://docs.python.org/lib/module-array.html provides  
> homogeneuos arrays that may be more efficient for your application. arrays  
> don't have a special API, you have to import the module and use its  
> functions the same as one would do in pure Python.

There's one special thing about it: the `buffer_info()` method returns a
tuple with the memory address and length (in items) of the current
underlying buffer. Pretty useless information in Python but handy in
extensions that can directly access the "raw" memory.

To the OP:  Since Python 2.5 the `ctypes` module is another way to
interface with "native" code in dynamic libraries from the standard

	Marc 'BlackJack' Rintsch

More information about the Python-list mailing list