Yes there is. You need to use non-blocking calls to receive from sockets. Check select module
If you are reading from sockets, here is how you use it:
while True:
ready_socks,_,_ = select.select(socks, [], [])
for sock in ready_socks:
data, addr = sock.recvfrom(1024)
print "received message:", data
Note. You can also pass an additional argument select.select(), which is a timeout. This will prevent blocking forever if the sockets are not ready.