मैं को एक सी फ़ंक्शन में चार पॉइंटर की एक सरणी पास करना चाहता हूं।c_char_p सरणी में आइटम कैसे सम्मिलित करें
मैं http://docs.python.org/library/ctypes.html#arrays
लिए मैं निम्नलिखित कोड लिखने का संदर्भ लें।
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')
और मुझे निम्न त्रुटि मिलती है।
TypeError: '_ctypes.PyCArrayType' object does not support item assignment
कोई विचार यह कैसे हल कर सकता हूं? मैं के साथ
c_function(const char** array_of_string);