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

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Thu Nov 13 19:40:56 EST 2008


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



More information about the Python-list mailing list