#!/usr/bin/env python3 import asyncio socket = "/tmp/sun-angle.s" async def send_location(lat, lon): msg = "quit\n" # f"{lat},{lon}\n" reader, writer = await asyncio.open_unix_connection(socket) writer.write(msg.encode("utf-8")) await writer.drain() print((await reader.readline()).decode('utf8')) asyncio.run(send_location(1, 2))