diff options
Diffstat (limited to 'Demo/sockets/mcast.py')
-rwxr-xr-x | Demo/sockets/mcast.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/sockets/mcast.py b/Demo/sockets/mcast.py index 1abd305..c1902d6 100755 --- a/Demo/sockets/mcast.py +++ b/Demo/sockets/mcast.py @@ -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 # |