-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 zefciu wrote: > I am trying to embed a c function in my python script for a first > time. When I try to call it I get an error > > SystemError: new style getargs format but argument is not a tuple > > Guido said on some mailing list, that it is probably an effect of > the lack of METH_VARARGS in the functions' array, but it's ok in my > source code. Here is the full code: > > #include <python2.4/Python.h> > > static PyObject * mandelpixel(PyObject *self, PyObject *args) { > double z_real = 0, z_imag = 0, z_real2 = 0, z_imag2 = 0, c_real, > c_imag, bailoutsquare; int iteration_number; register int i; > PyObject coord; if (!PyArg_ParseTuple(args, "Oid", &coord, > &iteration_number, &bailoutsquare)) return NULL; if > (!PyArg_ParseTuple(&coord, "dd", &c_real, &c_imag)) return NULL; Is coord always tuple?
- -- Thinker Li - [EMAIL PROTECTED] [EMAIL PROTECTED] http://heaven.branda.to/~thinker/GinGin_CGI.py -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4wQB1LDUVnWfY8gRAtWsAKCavY85KUtoppRSj0uQTeVnmLu5UwCgyfk1 0c5fkRgKaejDja1YWdKkaTg= =vMjd -----END PGP SIGNATURE-----
-- http://mail.python.org/mailman/listinfo/python-list