aboutsummaryrefslogtreecommitdiffstats
path: root/env/lib/python3.10/site-packages/PIL/_tkinter_finder.py
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-11-13 23:46:45 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-11-13 23:46:45 +0530
commit9468226a9e2e2ab8cdd599f1d8538e860ca86120 (patch)
tree0a77ada226d6db80639f96b438bf83e4e756edb5 /env/lib/python3.10/site-packages/PIL/_tkinter_finder.py
downloadidcard-9468226a9e2e2ab8cdd599f1d8538e860ca86120.tar.gz
idcard-9468226a9e2e2ab8cdd599f1d8538e860ca86120.tar.bz2
idcard-9468226a9e2e2ab8cdd599f1d8538e860ca86120.zip
id card generator
Diffstat (limited to 'env/lib/python3.10/site-packages/PIL/_tkinter_finder.py')
-rw-r--r--env/lib/python3.10/site-packages/PIL/_tkinter_finder.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/env/lib/python3.10/site-packages/PIL/_tkinter_finder.py b/env/lib/python3.10/site-packages/PIL/_tkinter_finder.py
new file mode 100644
index 0000000..5cd7e9b
--- /dev/null
+++ b/env/lib/python3.10/site-packages/PIL/_tkinter_finder.py
@@ -0,0 +1,23 @@
+""" Find compiled module linking to Tcl / Tk libraries
+"""
+import sys
+import tkinter
+from tkinter import _tkinter as tk
+
+from ._deprecate import deprecate
+
+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
+
+tk_version = str(tkinter.TkVersion)
+if tk_version == "8.4":
+ deprecate(
+ "Support for Tk/Tcl 8.4", 10, action="Please upgrade to Tk/Tcl 8.5 or newer"
+ )