PyObject_CallFunction and writable memory

Benjamin Peterson benjamin at python.org
Wed Aug 26 09:37:40 CEST 2009


Christopher Nebergall <christopher.nebergall <at> gmail.com> writes:

> 
> I'm currently using
> "PyObject_CallFunction(pFunc, "(s#)",p->lpbMemory, p->dwSize);" to
> send an immutable string but I haven't seen what I need to set in the
> format string which makes the data writable to python.    The solution
> can be for either python 2.6 or 3.1.

Have a look at the buffer interface: http://docs.python.org/3.1/c-api/buffer.html







More information about the Python-list mailing list