Calling C methods with Char** arguments from Python with ctypes
问题 I need a way to pass an array to char* from Python using ctypes library to a C library. Some ways I've tried lead me to segmentation faults, others to rubbish info. 回答1: As I've been struggling with this issue for some time, I've decided to write a small HowTo so other people can benefit. Having this C piece of code: void passPointerArray(int size, char **stringArray) { for (int counter=0; counter < size; counter++) { printf("String number %d is : %s\n", counter, stringArray[counter]); } } We