#!/usr/bin/env python3 from dial import DialManager, DialThread from phone import PhoneManager from time import sleep from queue import Queue if __name__ == "__main__": queue = Queue() dial_thread = DialThread(queue) print("starting thread") dial_thread.start() dial_manager = DialManager() phone_manager = PhoneManager() print("main loop") while True: dialed = queue.get(block=True) response = dial_manager.dial(dialed) if response is not None: phone_manager.handle_event(response)