summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.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/library/socket.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/library/socket.rst')
-rw-r--r--Doc/library/socket.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index f4265b4..a445b54 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -730,7 +730,7 @@ The first two examples support IPv4 only. ::
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
- print 'Connected by', addr
+ print('Connected by', addr)
while 1:
data = conn.recv(1024)
if not data: break
@@ -749,7 +749,7 @@ The first two examples support IPv4 only. ::
s.send('Hello, world')
data = s.recv(1024)
s.close()
- print 'Received', repr(data)
+ print('Received', repr(data))
The next two examples are identical to the above two, but support both IPv4 and
IPv6. The server side will listen to the first address family available (it
@@ -781,10 +781,10 @@ sends traffic to the first one connected successfully. ::
continue
break
if s is None:
- print 'could not open socket'
+ print('could not open socket')
sys.exit(1)
conn, addr = s.accept()
- print 'Connected by', addr
+ print('Connected by', addr)
while 1:
data = conn.recv(1024)
if not data: break
@@ -815,10 +815,10 @@ sends traffic to the first one connected successfully. ::
continue
break
if s is None:
- print 'could not open socket'
+ print('could not open socket')
sys.exit(1)
s.send('Hello, world')
data = s.recv(1024)
s.close()
- print 'Received', repr(data)
+ print('Received', repr(data))