summaryrefslogtreecommitdiffstats
path: root/ptpython/eventloop.py
diff options
context:
space:
mode:
Diffstat (limited to 'ptpython/eventloop.py')
-rw-r--r--ptpython/eventloop.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ptpython/eventloop.py b/ptpython/eventloop.py
index 14ab64b..a646274 100644
--- a/ptpython/eventloop.py
+++ b/ptpython/eventloop.py
@@ -7,6 +7,7 @@ way we don't block the UI of for instance ``turtle`` and other Tk libraries.
in readline. ``prompt-toolkit`` doesn't understand that input hook, but this
will fix it for Tk.)
"""
+
from __future__ import annotations
import sys
@@ -23,9 +24,8 @@ def _inputhook_tk(inputhook_context: InputHookContext) -> None:
Run the Tk eventloop until prompt-toolkit needs to process the next input.
"""
# Get the current TK application.
- import tkinter
-
import _tkinter # Keep this imports inline!
+ import tkinter
root = tkinter._default_root # type: ignore