How can I parse False from c extension?

Allen Allen.Chenal at gmail.com
Tue Jun 12 05:54:06 EDT 2007


On 6 12 ,   5 21 , "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
> En Tue, 12 Jun 2007 05:07:13 -0300, Allen <Allen.Che... at gmail.com>
> escribió:
>
> >> From python command, I call C extension method
> >>>> import PyRPC
> >>>> PyRPC.addBool(False)
>
> > In C extension, I know parse integer value like this:
> > PyArg_ParseTuple(args, "i", &nValue);
>
> > But, how can I parse the False value?
>
> Parse them as integers, with False==0 and True==1.
>
> --
> Gabriel Genellina

Thanks!
It does work.




More information about the Python-list mailing list