Using PyArg_VaParse
bhosu at my-deja.com
bhosu at my-deja.com
Tue Jun 8 09:41:16 EDT 1999
Hi All,
I want to use PyArg_VaParse to retrieve variable number of arguments.
I am not sure if this is the correct function to use. I have embedded
python in a C++ application and implemented python methods in C++. I
have a situation where, the method may pass any number of string
parameters. I would like to get these parameters in my C++ code. Here is
a scenario of the whole thing.
(C++ implementation.. for method bar in the module foo.)
static PyObject *bar(PyObject *self,PyObject *args)
{
....
if(PyArg_VaParse(args,...) /* What is that I need to use here...? */
...
}
and a pythod call may be like,
import foo
foo.bar('a','b','c')
foo.bar('a','b','c','d'.....)
I need to know the Python API call to use to get the arguments. As I
said before I donot know how many arguments are being passed.
Thanks for any help...
Sundar.R
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
More information about the Python-list
mailing list