summaryrefslogtreecommitdiffstats
path: root/Doc/faq/extending.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-12-19 17:59:59 (GMT)
committerGeorg Brandl <georg@python.org>2009-12-19 17:59:59 (GMT)
commit62423cba9594d4c40c5432333ec42dc56829a025 (patch)
treea21f94824cca3d3fa0ceb6ff7f8fa02dccbf37d2 /Doc/faq/extending.rst
parent9e4ff75325cb5c4df61dad3bb64e5b5551bf7d3d (diff)
downloadcpython-62423cba9594d4c40c5432333ec42dc56829a025.zip
cpython-62423cba9594d4c40c5432333ec42dc56829a025.tar.gz
cpython-62423cba9594d4c40c5432333ec42dc56829a025.tar.bz2
#7500: add "Python 3 review needed" comments and fix a few obvious errors.
Diffstat (limited to 'Doc/faq/extending.rst')
-rw-r--r--Doc/faq/extending.rst19
1 files changed, 9 insertions, 10 deletions
diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst
index f01b0a0..7f3fda7 100644
--- a/Doc/faq/extending.rst
+++ b/Doc/faq/extending.rst
@@ -7,6 +7,9 @@ Extending/Embedding FAQ
.. highlight:: c
+.. XXX need review for Python 3.
+
+
Can I create my own functions in C?
-----------------------------------
@@ -51,8 +54,7 @@ with a tool such as `SWIG <http://www.swig.org>`_. `SIP
<http://www.riverbankcomputing.co.uk/software/sip/>`__, `CXX
<http://cxx.sourceforge.net/>`_ `Boost
<http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
-<http://www.scipy.org/site_content/weave>`_ are also alternatives for wrapping
-C++ libraries.
+<http://www.scipy.org/Weave>`_ are also alternatives for wrapping C++ libraries.
How can I execute arbitrary Python statements from C?
@@ -159,8 +161,8 @@ Sample code and use for catching stdout:
...
>>> import sys
>>> sys.stdout = StdoutCatcher()
- >>> print 'foo'
- >>> print 'hello world!'
+ >>> print('foo')
+ >>> print('hello world!')
>>> sys.stderr.write(sys.stdout.data)
foo
hello world!
@@ -201,7 +203,7 @@ For C++ libraries, you can look at `SIP
<http://www.riverbankcomputing.co.uk/sip/>`_, `CXX
<http://cxx.sourceforge.net/>`_, `Boost
<http://www.boost.org/libs/python/doc/index.html>`_, `Weave
-<http://www.scipy.org/site_content/weave>`_ or `SWIG <http://www.swig.org>`_
+<http://www.scipy.org/Weave>`_ or `SWIG <http://www.swig.org>`_
I added a module using the Setup file and the make fails; why?
@@ -470,12 +472,9 @@ checking the value of sys.maxunicode:
>>> import sys
>>> if sys.maxunicode > 65535:
- ... print 'UCS4 build'
+ ... print('UCS4 build')
... else:
- ... print 'UCS2 build'
+ ... print('UCS2 build')
The only way to solve this problem is to use extension modules compiled with a
Python binary built using the same size for Unicode characters.
-
-
-