If the PyObject is a PyList, and all list items are strings,
say a=['aaa','bbb','ccc']

How can I have a
myArray[0] = "aaa"
myArray[1] = "bbb"
myArray[2] = "ccc"
in C++?

Do I have to
use PyModule_GetDict() to get the dict first?
what about the next?


>
> What do you know about the contents of 'argc' and 'argv'?  If it's
> impossible with Py_Main, can you use one of the other entry points?
>
> If you've never manipulated PyObject* objects in C, they can be
> hairy.  Even if you know 'a' is a sequence, its contents are still all
> PyObject*s, which you can access via PyList_... and PySequence_
> functions.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to