[ctypes-users] array of strings from python to C
Brought to you by:
theller
From: Thomas S. <th...@ws...> - 2009-04-03 21:05:07
|
I'm trying to build up an array of pointers to null terminated strings to hand to a char ** argument. My first try is something like this: strings = c_char_p * 3 strings[0] = c_char_p("one") strings[1] = c_char_p("two") strings[2] = c_char_p("three") but of course I hit the evil "object does not support item assignment". Any ideas? |