Velocity Reviews

Velocity Reviews (
-   Python (
-   -   buffer creates only read-only buffer? (

Neal Becker 01-08-2009 01:58 AM

buffer creates only read-only buffer?
m = mmap.mmap (fd, 64, prot=mmap.PROT_READ|mmap.PROT_WRITE, flags=mmap.MAP_SHARED)
b2 = buffer (m)

print b2
<read-only buffer for 0x110cae0, size -1, offset 0 at 0x10fd8f0>

Why read-only? Why doesn't 'buffer' allow creation of read-write? Should buffer constructor take an additional optional arg for specifying this? Doc doesn't say anything about the fact that it's read only.

All times are GMT. The time now is 07:34 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.