converting C library to python

Michal Tondyra kestrel at
Mon Nov 12 10:25:00 CET 2001


While I was converting C library to python I came across a little problem
- how to convert an array of int's into tuple. I found it impossible to do
with Py_BuildValue function, which needs every element of tuple to be
mentioned in format string.

So what I have is an array of int's e.g. int my_array[100]
and what I want to have is PyObject structure representing tuple of
integers from my_array.

How to do it?
Can anyone help me?

thanks in advance
Michal Tondyra

More information about the Python-list mailing list