How would you implement a basic event-loop? How would you implement a basic event-loop? python python