PyArg_ParseTuple() and oprtional remaining argument lists

phil phil at ricochet.net
Tue Nov 30 02:38:49 EST 1999


On Mon, 29 Nov 1999 13:50:22 -0000, "Adrian Eyre"
<a.eyre at optichrome.com> wrote:

Thanks, that fixed both the problems.

phil.

>Aha. That's the clue. Make sure that your PyMethodDef struct is like
>this:
>
>static struct PyMethodDef methods[] = {
>    { "method1",   method1, 1 },
>    { "method2",   method2, 1 },
>    { NULL,        NULL,    0 } 
>};
>
>Not like this:
>
>static struct PyMethodDef methods[] = {
>    { "method1",   method1 },
>    { "method2",   method2 },
>    { NULL,        NULL    } 
>};
>
>--------------------------------------------
>Adrian Eyre <mailto:a.eyre at optichrome.com>
>Optichrome Computer Solutions Ltd
>Maybury Road, Woking, Surrey, GU21 5HX, UK
>Tel: +44 1483 740 233  Fax: +44 1483 760 644
>http://www.optichrome.com 
>--------------------------------------------
>
>
>

The world is divided into two sorts of people: those that think the
world is divided into two sorts of people and those that don't.




More information about the Python-list mailing list