EM_GETLINE,Win32gui, address of buffer
Neil Hodgson
nhodgson at bigpond.net.au
Wed Dec 19 00:28:39 EST 2001
Mark_Pryor:
> When I use the message, EM_GETLINE, the lParam calls for
> an address of a string buffer. How do I prepare this buffer in Python?
Use the array module to create a buffer of a reasonable size and then
find its address as the first element of the tuple returned by the
buffer_info method.
>>> import array
>>> b = array.array('c', 'x'*1000)
>>> b.buffer_info()
(15080104, 1000)
>>>
Ensure that the buffer object's life outlives your use of the address.
Neil
More information about the Python-list
mailing list