import socket socket_path = '/tmp/my_socket' # Create the Unix socket server client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) client.bind(socket_path) client.send("hello".encode()) while True: data, addr = client.recvfrom(1024) print(data)