Pass a tuple (or list) to a C wrapper function

Fredrik Lundh fredrik at pythonware.com
Thu Oct 13 11:25:49 EDT 2005


"Java and Swing" wrote:

> anyhow, for receiving an object from python..is it
>
> ok = PyArg_ParseTuple(args, "sO", &x, &y);
>
> ...is it "sO" or "s0" ....is it O (as in the letter) or 0 (as in the
> number)?  I would think "O" the letter..but it looks like a zero.

eh?  if you're not sure, what keeps you from cutting and pasting ?
or comparing it visually with characters that you type in yourself ?

(it's the letter O, for Object.  the corresponding variable must be a
pointer to a PyObject pointer.  see the documentation for details:

    http://www.python.org/doc/current/api/arg-parsing.html

)

</F>






More information about the Python-list mailing list