[issue9229] memoryview of mmap object not working in 2.7

2010-07-11 Thread Matt Gattis
New submission from Matt Gattis : This code works in 3.1.2 but not in 2.7: >>> import mmap >>> m = mmap.mmap(-1,20) >>> v = memoryview(m) Traceback (most recent call last): File "", line 1, in TypeError: cannot make memory view because objec

[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-09 Thread Matt Gattis
New submission from Matt Gattis : >>> view = memoryview(bytearray(bufsize)) >>> while len(view): ...view = view[sock.recv_into(view,1024):] ... Traceback (most recent call last): File "", line 2, in TypeError: recv_into() argument 1 must be p

[issue8042] mmap buffer implementation does not respect seek pos

2010-03-02 Thread Matt Gattis
New submission from Matt Gattis : If you do: import io,mmap b = io.BytesIO("abc") m = mmap.mmap(-1,10) m.seek(5) b.readinto(m) M is now: 'abc\x00\x00\x00\x00\x00\x00\x00' Basically there is no way to readinto/recv_into an arbitary position in an mmap object without c