Hi,
Need some help,
in the Python, I have a array of string
var_array=["Opt1=DG","Opt1=DG2"]
I need to call c library and pass var_array as parameter
In the argtypes, how do I set up ctypes.POINTER(???) for var_array?
func.argtypes=[ctypes.c_void_p,ctypes.c_int, ctypes.POINTER()]
I
I’m not sure this is the shortest method, but you could set up two python
scripts to do the same thing and convert them to c using cython. I wouldn’t be
able to read the c scripts, but maybe you could.
Maybe someone else has a more direct answer.
Sent from my iPhone
> On May 11, 2023, at 10:
On 5/11/23, Jason Qian via Python-list wrote:
>
> in the Python, I have a array of string
> var_array=["Opt1=DG","Opt1=DG2"]
> I need to call c library and pass var_array as parameter
> In the argtypes, how do I set up ctypes.POINTER(???) for var_array?
>
> func.argtypes=[ctypes.c_void_p,ctyp
Awesome, thanks!
On Thu, May 11, 2023 at 1:47 PM Eryk Sun wrote:
> On 5/11/23, Jason Qian via Python-list wrote:
> >
> > in the Python, I have a array of string
> > var_array=["Opt1=DG","Opt1=DG2"]
> > I need to call c library and pass var_array as parameter
> > In the argtypes, how do I se