I want to pass an array of char pointer to a C function.
I refer to http://docs.python.org/library/ctypes.html#arrays
I write the following code.
from ctypes import *
names = c_char_p * 4
# A 3 times for loop will be written here.
# The last array will assign to a null pointer.
# So that C function knows where is the end of the array.
names[0] = c_char_p('hello')
and I get the following error.
TypeError: '_ctypes.PyCArrayType' object does not support item assignment
Any idea how I can resolve this? I want to interface with
c_function(const char** array_of_string);