On Sep 22, 9:32 pm, [EMAIL PROTECTED] wrote:
> I have a PyObject, say 'Hello World' , a string,
> How do I convert it to a string in C++?
> Thanks in advance!

Look at PyString_AsStringAndSize .  It gives you a pointer to a buffer
and a size.  Allocate a new one and copy it if you need to modify it,
or you want a copy that outlives the object version.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to