wL iC&dZddlZddlZddlZdZy)a Wrapper around the eventloop that gives some time to the Tkinter GUI to process events when it's loaded and while we are waiting for input at the REPL. This way we don't block the UI of for instance ``turtle`` and other Tk libraries. (Normally Tkinter registers it's callbacks in ``PyOS_InputHook`` to integrate in readline. ``prompt-toolkit`` doesn't understand that input hook, but this will fix it for Tk.) Nc|tjfd}fd}tdr|y|yy)zj Inputhook for Tk. Run the Tk eventloop until prompt-toolkit needs to process the next input. c>dgfd}jjtj|j tj r&drn j tj r&j jy)zv Run the TK eventloop until the file handler that we got from the inputhook becomes readable. Fcdd<y)NTr)astops g/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/IPython/terminal/pt_inputhooks/tk.pydonez7inputhook..wait_using_filehandler..doneAs DGrN)createfilehandlerfileno_tkinterREADABLE dooneevent ALL_EVENTSdeletefilehandler)r rinputhook_contextroots @r wait_using_filehandlerz)inputhook..wait_using_filehandler8sw  07798;L;LdSooh112Awooh112 0779:r c8jsjtjtjzr2 jtjtjzr2t j djsyy)z Windows TK doesn't support 'createfilehandler'. So, run the TK eventloop and poll until input is ready. g{Gz?N)input_is_readyrrr DONT_WAITtimesleep)rrsr wait_using_pollingz%inputhook..wait_using_pollingMsl $224//("5"58J8J"JK//("5"58J8J"JK JJt  $224r Nr )tkinter _default_roothasattr)rrrrs` @r inputhookr0s>  D;*   4, - " $  r )__doc__rrrrrr r r!s@ -!r