Re: handling a (python) list to fit in a char** argument

LukenShiro <[email protected]> Sat, 11 Dec 2010 20:37:50 +0100
Newsgroups gmane.comp.python.ctypes
Message-ID <[email protected]>
Il giorno Sat, 11 Dec 2010 09:24:50 -0800
"Mark Tolonen" <[email protected]> ha scritto:
> To convert your list of strings array, use:
> 
>     def convert_to_ptr_string(paramname):
>         return (c_char_p * len(paramname))(*paramname)
> 
> and pass the return value of this function directly to your function
> that takes POINTER(c_char_p).


Perfect, I tried different combinations for some hours, but I had not
tried this one, yet ;) Thank you very much!!!
Best regards.

-- 
GNU/Linux * Slackware64 current
LU #210970 SU #12583 LM #98222/#412913


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev