Handling variable number of arguments.
bhosu at my-deja.com
bhosu at my-deja.com
Tue Jun 1 14:04:09 EDT 1999
Hi All,
I am embedding Python in an application(C++). I would like to pass
variable number of args to the python function. I could do that from
python by using def foo(*args). How do I parse these arguments inside my
application? In PyARg_ParseTuple, I have to know exactly how many args
to read etc. I am using Python v 1.4. I was looking at
PyArg_ParseTupleAndKeywords but that needs the args to be a dictionary.
I am looking a similar thingy for lists. A typeical scenario of the
usage is like,
import foo
foo.set_args('bar','=','1','2','3')
where foo is the module containing the method implementation.
Thanks,
Bhosu.
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