diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-03-17 13:05:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 13:05:52 +0200 |
commit | c2e3c06139e9468efb32629d147d99a1672d9e19 (patch) | |
tree | 39d3a7a04231ee4c4f34bf1eab01afdd83a1b2e4 /Lib/tkinter/ttk.py | |
parent | 7aeb06f78ee4abba64ca2c5c7a848fd2616da6fb (diff) | |
download | cpython-git-c2e3c06139e9468efb32629d147d99a1672d9e19.tar.gz |
bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)
Diffstat (limited to 'Lib/tkinter/ttk.py')
-rw-r--r-- | Lib/tkinter/ttk.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py index acdd565ec4..efeabb7a92 100644 --- a/Lib/tkinter/ttk.py +++ b/Lib/tkinter/ttk.py @@ -28,23 +28,6 @@ __all__ = ["Button", "Checkbutton", "Combobox", "Entry", "Frame", "Label", import tkinter from tkinter import _flatten, _join, _stringify, _splitdict -# Verify if Tk is new enough to not need the Tile package -_REQUIRE_TILE = True if tkinter.TkVersion < 8.5 else False - -def _load_tile(master): - if _REQUIRE_TILE: - import os - tilelib = os.environ.get('TILE_LIBRARY') - if tilelib: - # append custom tile path to the list of directories that - # Tcl uses when attempting to resolve packages with the package - # command - master.tk.eval( - 'global auto_path; ' - 'lappend auto_path {%s}' % tilelib) - - master.tk.eval('package require tile') # TclError may be raised here - master._tile_loaded = True def _format_optvalue(value, script=False): """Internal function.""" @@ -360,11 +343,6 @@ class Style(object): def __init__(self, master=None): master = setup_master(master) - - if not getattr(master, '_tile_loaded', False): - # Load tile now, if needed - _load_tile(master) - self.master = master self.tk = self.master.tk @@ -546,9 +524,6 @@ class Widget(tkinter.Widget): readonly, alternate, invalid """ master = setup_master(master) - if not getattr(master, '_tile_loaded', False): - # Load tile now, if needed - _load_tile(master) tkinter.Widget.__init__(self, master, widgetname, kw=kw) |