Need help with Tuples

Adrian Eyre a.eyre at optichrome.com
Fri Dec 17 08:28:49 EST 1999


>   if(!PyArg_ParseTuple(nobj, "i", &val)){  // fails every stinking time.
>    appcallback()->messageBox("not again");
>   }

nobj is not a tuple, it's just an single value. If you can safely assume
it's an integer, you can use:

long val = PyInt_AsLong(nobj);

--------------------------------------------
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 
--------------------------------------------





More information about the Python-list mailing list