summaryrefslogtreecommitdiffstats
path: root/Demo/sockets/ftp.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
committerCollin Winter <collinw@gmail.com>2007-07-17 20:59:35 (GMT)
commit6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch)
tree5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/sockets/ftp.py
parenta8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff)
downloadcpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz
cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
Diffstat (limited to 'Demo/sockets/ftp.py')
-rwxr-xr-xDemo/sockets/ftp.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/sockets/ftp.py b/Demo/sockets/ftp.py
index eed45be..9f9f1dc 100755
--- a/Demo/sockets/ftp.py
+++ b/Demo/sockets/ftp.py
@@ -107,13 +107,13 @@ def sendportcmd(s, f, port):
def getreply(f):
line = f.readline()
if not line: return 'EOF'
- print line,
+ print(line, end=' ')
code = line[:3]
if line[3:4] == '-':
while 1:
line = f.readline()
if not line: break # Really an error
- print line,
+ print(line, end=' ')
if line[:3] == code and line[3:4] != '-': break
return code
@@ -121,14 +121,14 @@ def getreply(f):
# Get the data from the data connection.
#
def getdata(r):
- print '(accepting data connection)'
+ print('(accepting data connection)')
conn, host = r.accept()
- print '(data connection accepted)'
+ print('(data connection accepted)')
while 1:
data = conn.recv(BUFSIZE)
if not data: break
sys.stdout.write(data)
- print '(end of data connection)'
+ print('(end of data connection)')
def raw_input(prompt):
sys.stdout.write(prompt)
@@ -140,7 +140,7 @@ def raw_input(prompt):
def getcommand():
try:
while 1:
- line = raw_input('ftp.py> ')
+ line = input('ftp.py> ')
if line: return line
except EOFError:
return ''