summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2015-11-13 05:46:46 -0800
committerMatěj Cepl <mcepl@cepl.eu>2015-11-16 21:49:54 +0100
commit4964fb10003bc8e06e546b62431e2a38a1f4a180 (patch)
treef998eb8914d46680b8e7d0e17aa0b1209d66fa29 /doc
parent227aeb7966f9b5d41c6988cf53c05aa536334a7e (diff)
downloadm2crypto-4964fb10003bc8e06e546b62431e2a38a1f4a180.tar.gz
Use print as a function for Python 3. [PEP 3105]
For Python 2 compatibility, import print_function from the __future__ module. This works as far back as Python 2.6.0a2: https://docs.python.org/2/library/__future__.html
Diffstat (limited to 'doc')
-rw-r--r--doc/ZServerSSL-HOWTO.html4
-rw-r--r--doc/howto.ca.html2
-rw-r--r--doc/howto.smime.html18
3 files changed, 12 insertions, 12 deletions
diff --git a/doc/ZServerSSL-HOWTO.html b/doc/ZServerSSL-HOWTO.html
index 78c15a9..827cd0e 100644
--- a/doc/ZServerSSL-HOWTO.html
+++ b/doc/ZServerSSL-HOWTO.html
@@ -224,7 +224,7 @@ header: Content-Length: 535
&gt;&gt;&gt; while 1:
... data = u.read()
... if not data: break
-... print data
+... print(data)
...
</pre>
<pre class="literal-block">
@@ -255,7 +255,7 @@ header: Content-Length: 535
<pre class="doctest-block">
&gt;&gt;&gt; from M2Crypto.m2xmlrpclib import Server, SSL_Transport
&gt;&gt;&gt; zs = Server('https://127.0.0.1:9443/', SSL_Transport())
-&gt;&gt;&gt; print zs.propertyMap()
+&gt;&gt;&gt; print(zs.propertyMap())
[{'type': 'string', 'id': 'title', 'mode': 'w'}]
&gt;&gt;&gt;
</pre>
diff --git a/doc/howto.ca.html b/doc/howto.ca.html
index 74142d5..f33d7e5 100644
--- a/doc/howto.ca.html
+++ b/doc/howto.ca.html
@@ -888,4 +888,4 @@ CLASS="LITERAL"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>
diff --git a/doc/howto.smime.html b/doc/howto.smime.html
index 3e77ad2..00c5346 100644
--- a/doc/howto.smime.html
+++ b/doc/howto.smime.html
@@ -688,7 +688,7 @@ CLASS="PROGRAMLISTING"
out.write('Subject: M2Crypto S/MIME testing\n')
s.write(out, p7, buf)
- print out.read()
+ print(out.read())
# Save the PRNG's state.
Rand.save_file('randpool.dat')
@@ -781,9 +781,9 @@ CLASS="PROGRAMLISTING"
# Load the data, verify it.
p7, data = SMIME.smime_load_pkcs7('sign.p7')
v = s.verify(p7, data)
- print v
- print data
- print data.read()
+ print(v)
+ print(data)
+ print(data.read())
</PRE
><P
>Here's the output of the above program:
@@ -878,7 +878,7 @@ CLASS="PROGRAMLISTING"
out.write('Subject: M2Crypto S/MIME testing\n')
s.write(out, p7)
- print out.read()
+ print(out.read())
# Save the PRNG's state.
Rand.save_file('randpool.dat')
@@ -937,7 +937,7 @@ CLASS="PROGRAMLISTING"
# Decrypt p7.
out = s.decrypt(p7)
- print out
+ print(out)
</PRE
><P
>Here's the output:
@@ -1003,7 +1003,7 @@ CLASS="PROGRAMLISTING"
out.write('Subject: M2Crypto S/MIME testing\n')
s.write(out, p7)
- print out.read()
+ print(out.read())
# Save the PRNG's state.
Rand.save_file('randpool.dat')
@@ -1121,7 +1121,7 @@ CLASS="PROGRAMLISTING"
p7, data = SMIME.smime_load_pkcs7_bio(p7_bio)
v = s.verify(p7)
- print v
+ print(v)
</PRE
><P
>The output is as follows:
@@ -1570,4 +1570,4 @@ CLASS="LITERAL"
></DIV
></BODY
></HTML
-> \ No newline at end of file
+>