How does a C API-function returns a list to python
yarlevub at aol.com
Sun Jan 12 22:52:04 CET 2003
>> The simplest way is to return a string containing the data and then use the
>> array module to make it available to your Python program.
>Do people really do such things?
I do it to keep from having to write as much C code as you showed in your
response to the OP.
Of course, your solution has the advantage that users of the module don't need
to deal with the underlying binary representation of the data.
In my case I am the user and I tend to wrap the low level up with either a
class or function in Python. I would rather keep my C code really simple
because it is harder to debug than Python.
More information about the Python-list