I\'ve got a C python extension, and I would like to print out some diagnostics.
I\'m receiving a string as a PyObject*.
What\'s the canonical way to obtain a
Try PyObject_Repr (to mimic Python's repr) or PyObject_Str (to mimic Python's str).
PyObject_Repr
repr
PyObject_Str
str
Docs:
Compute a string representation of object o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression repr(o). Called by the repr() built-in function.