Using Boost::Python, is there a way to make a raw C++ buffer accessible to Python 3.2 as a bytes object?
There is a Python 2 answer to a very similar question, but the PyBuffer_FromReadWriteMemory function described there no longer exist in Python 3.
Edit: thanks to user2167433's answer, what I actually want is a read only memoryview object, not a bytes object (using a memoryview avoids copying the buffer I believe).
bytesobject? Is the buffer immutable?