import select, socket port = 53005 # where do you expect to get a msg? bufferSize = 1024 # whatever you need s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.bind(('<broadcast>', port)) s.setblocking(0) while True: result = select.select([s],[],[]) msg = result[0][0].recv(bufferSize) print msg