The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
Here's the same example that you've used but for Python 3:
Note that it's using PyUnicode_ instead of PyString_/PyBytes_. ManyIn many places where Python 2.x used byte strings, Python 3.x uses unicode strings.
By the way, I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
Here's the same example that you've used but for Python 3:
Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.
By the way, I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
Here's the same example that you've used but for Python 3:
Note that it's using PyUnicode_ instead of PyString_/PyBytes_. In many places where Python 2.x used byte strings, Python 3.x uses unicode strings.
By the way, I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
Here's the same example that you've used but for Python 3:
Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.
By the way, I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
Here's the same example that you've used but for Python 3:
Note that it's using PyUnicode_ instead of PyString_/PyBytes_. Many places where Python 2.x used byte strings, Python 3.x uses unicode strings.
By the way, I usually use this page to look up all possible calls:
The example code you used is for ancient Python version, 2.3.2. Python 3.x line introduced a number of incompatibilites not only in the language but in the C API as well.
The functions you mention simply no longer exist in Python 3.2.
PyString_ functions were renamed to PyBytes_.
PyInt_ functions are gone, PyLong_ should be used instead.
I usually use this page to look up all possible calls: