def wait_using_polling() -> None:
        """
        Windows TK doesn't support 'createfilehandler'.
        So, run the TK eventloop and poll until input is ready.
        """
        while not inputhook_context.input_is_ready():
            while root.dooneevent(_tkinter.ALL_EVENTS | _tkinter.DONT_WAIT):
                pass
            # Sleep to make the CPU idle, but not too long, so that the UI
            # stays responsive.
            time.sleep(0.01)

        Windows TK doesn't support 'createfilehandler'.
        So, run the TK eventloop and poll until input is ready.
        
src/ptpython/eventloop.py