Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > buffer creates only read-only buffer?

Thread Tools

buffer creates only read-only buffer?

Neal Becker
Posts: n/a
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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
email.encoders.encode_base64 creates one line only Python 1 02-10-2011 03:51 PM
convert M bit buffer to N bit buffer C++ 2 03-26-2007 09:43 AM
Roxio Easy CD & DVD - Disc Creator Classic creates read-only dvd-rw disks Renee Roberts Computer Support 6 08-07-2006 12:05 AM
enum creates undeclared identifier (only sometimes?) C++ 8 06-25-2005 11:48 AM
How to know the buffer size and increase buffer size in c++ Raja C++ 12 06-21-2004 06:21 PM