mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
This commit is contained in:
parent
a8c360ee76
commit
6f2df4d5e1
132 changed files with 1070 additions and 1080 deletions
|
@ -52,7 +52,7 @@ def receiver():
|
|||
while 1:
|
||||
data, sender = s.recvfrom(1500)
|
||||
while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's
|
||||
print sender, ':', repr(data)
|
||||
print(sender, ':', repr(data))
|
||||
|
||||
|
||||
# Open a UDP socket, bind it to a port and select a multicast group
|
||||
|
@ -76,7 +76,7 @@ def openmcastsock(group, port):
|
|||
group = gethostbyname(group)
|
||||
#
|
||||
# Construct binary group address
|
||||
bytes = map(int, string.split(group, "."))
|
||||
bytes = list(map(int, string.split(group, ".")))
|
||||
grpaddr = 0
|
||||
for byte in bytes: grpaddr = (grpaddr << 8) | byte
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue