How to use a contiguous memory location of n bytes in python

Aaron Brady castironpi at gmail.com
Fri Nov 14 09:00:54 CET 2008


On Nov 13, 6:40 pm, bearophileH... at lycos.com wrote:
> chachi:
>
> > I want to know how to instantiate a data structure which has n bytes
> > (given by me) and is internally stored in a contiguous fashion.
>
> array.array("B", ...) may be fit for you. You can also use a numpy
> array of bytes.
>
> Bye,
> bearophile

Also, there is the 'mmap' module.



More information about the Python-list mailing list