What you did was create an array type, not an actual array, so basically:
import ctypes array_type = ctypes.c_char_p * 4 names = array_type()
Then you can do something line by line:
names[0] = "foo" names[1] = "bar"
... and go to calling your C function with an array of names as a parameter.
Jim brissom
source share