args in PyArg_ParseTuple

lud lud at sogetek.fr
Tue Sep 4 06:42:46 EDT 2001


that works
thanks !!!!


"Sylvain Thenault" <syt at pegasus.logilab.fr> a écrit dans le message news:
slrn9p9b76.bkf.syt at pegasus.logilab.fr...
> On Tue, 4 Sep 2001 12:13:31 +0200, lud <lud at sogetek.fr> wrote:
> >hello,
> >
> >i write a module for python and i want to manipulate string with null
char
> >so, i use (in c)
> >PyArg_ParseTuple(args, "s",&myString) // mystring is a char*
> >and i get a error message like that :
> >    type error argument 1: expected string without null byte, string
found
> >
>
> PyArg_ParseTuple(args, "s#",&myString, &size) // mystring is a char*
>
> size is an integer (length of the string)
>
>
> --
> Sylvain Thenault
>
> LOGILAB
>





More information about the Python-list mailing list