summaryrefslogtreecommitdiffstats
path: root/Doc/extending/embedding.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
commit6911e3ce3f72af759908b869b73391ea00d328e2 (patch)
tree5d4ff6070cb3f0f46f0a31ee4805b41053a06b48 /Doc/extending/embedding.rst
parentc9879246a2dd33a217960496fdf4606cb117c6a6 (diff)
downloadcpython-6911e3ce3f72af759908b869b73391ea00d328e2.zip
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.gz
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.bz2
Convert all print statements in the docs.
Diffstat (limited to 'Doc/extending/embedding.rst')
-rw-r--r--Doc/extending/embedding.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
index b9a567c..a50c008 100644
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -64,7 +64,7 @@ perform some operation on a file. ::
{
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
- "print 'Today is',ctime(time())\n");
+ "print('Today is', ctime(time()))\n");
Py_Finalize();
return 0;
}
@@ -141,7 +141,7 @@ array. If you compile and link this program (let's call the finished executable
:program:`call`), and use it to execute a Python script, such as::
def multiply(a,b):
- print "Will compute", a, "times", b
+ print("Will compute", a, "times", b)
c = 0
for i in range(0, a):
c = c + b
@@ -234,7 +234,7 @@ These two lines initialize the ``numargs`` variable, and make the
With these extensions, the Python script can do things like ::
import emb
- print "Number of arguments", emb.numargs()
+ print("Number of arguments", emb.numargs())
In a real application, the methods will expose an API of the application to
Python.