Convert all print statements in the docs.

This commit is contained in:
Georg Brandl 2007-09-04 07:15:32 +00:00
parent c9879246a2
commit 6911e3ce3f
71 changed files with 351 additions and 388 deletions

View file

@ -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.