PyObject_CallFunction and writable memory

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

Christopher Nebergall <christopher.nebergall <at>> 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:

More information about the Python-list mailing list