Pillow/src/PIL/_tkinter_finder.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
540 B
Python
Raw Normal View History

""" Find compiled module linking to Tcl / Tk libraries
"""
from __future__ import annotations
import sys
2021-01-26 00:01:26 +03:00
import tkinter
2024-02-10 11:50:45 +03:00
tk = getattr(tkinter, "_tkinter")
try:
if hasattr(sys, "pypy_find_executable"):
TKINTER_LIB = tk.tklib_cffi.__file__
else:
TKINTER_LIB = tk.__file__
except AttributeError:
# _tkinter may be compiled directly into Python, in which case __file__ is
# not available. load_tkinter_funcs will check the binary first in any case.
TKINTER_LIB = None
2021-01-26 00:01:26 +03:00
tk_version = str(tkinter.TkVersion)