In python 2.x versions there is a function named as PyString_AS_STRING to convert a pyobject pointer to a string or char pointer.
How can we achieve the same functionality in python 3?
There's a PyUnicode_AS_UNICODE macro.
BTW: PyString_AS_STRING only works for string objects, returning a C string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With