New submission from anatoly techtonik :
ctypes documentation lacks an example, how to pass a raw data block from Python to a C function. For example, how to pass this chunk:
data = open('somefile', 'rb').read()
to this function:
int checkBuffer(LPSTR lpData, DWORD dwBufferLength);
?
----------
assignee: docs@python
components: Documentation, ctypes
messages: 139675
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: ctypes: need example how to pass raw data from Python
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
_______________________________________
Python tracker
http://bugs.python.org/issue12476
_______________________________________