diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-11-08 17:24:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-11-08 17:24:34 (GMT) |
commit | 06fd5f8cc854c79b5a4b113d7ef9ab01227d94cf (patch) | |
tree | 36c5625b8dcb782c92f6e67fc566659c3dda9fce /Demo/sockets/udpecho.py | |
parent | ef6a19e3eab6dca9ef7eba92b636a4c2e88979c4 (diff) | |
download | cpython-06fd5f8cc854c79b5a4b113d7ef9ab01227d94cf.zip cpython-06fd5f8cc854c79b5a4b113d7ef9ab01227d94cf.tar.gz cpython-06fd5f8cc854c79b5a4b113d7ef9ab01227d94cf.tar.bz2 |
fix the socketserver demo code for py3k
#4275 Thanks to Don MacMillen
Diffstat (limited to 'Demo/sockets/udpecho.py')
-rwxr-xr-x | Demo/sockets/udpecho.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Demo/sockets/udpecho.py b/Demo/sockets/udpecho.py index 8a6bd21..9966fd8 100755 --- a/Demo/sockets/udpecho.py +++ b/Demo/sockets/udpecho.py @@ -56,7 +56,8 @@ def client(): line = sys.stdin.readline() if not line: break - s.sendto(line, addr) + print('addr = ', addr) + s.sendto(bytes(line, 'ascii'), addr) data, fromaddr = s.recvfrom(BUFSIZE) print('client received %r from %r' % (data, fromaddr)) |