[Tkinter-discuss] Tcl/Tk/Tkinter now in macOS Pythons

bob bob at passcal.nmt.edu
Wed Jun 19 13:55:23 EDT 2019


So with recent versions of the Python 2 and 3 installers for macOS the Python.org (not .com! :) have started including their own private copy of Tcl/Tk (8.6.8) and 'import Tkinter/tkinter' works right out of the box. What does that mean? Is Tkinter going to be pushed back up the popularity ladder? Every one else at work uses PyQT or even wxPython. I don't care for the look or feel or coding of either one. Unfortunately, this Tkinter still doesn't work right under 2 or 3. Example:

from Tkinter (or tkinter) import *
Root = Tk()
B = Button(Root, text = "test")
B.pack()
B.config(bg = "red")

The background doesn't change color and the whole interface is Aqua-like with rounded bad looking buttons and white on white backgrounds, instead of X11/Linux square-corner buttons and shades of grey backgrounds. Is there a chance of that being fixed now that it's all included? There is other GUI funny business too. We started compiling our own versions of Python for Macs (and Linux, Sun) a long time ago and our Tkinter programs fire up XQuartz on Macs to get that Linux look and feel. I wonder if there is something simple that can be set for these new versions to get a better renderer? It might be within XQuartz. When you install it there is a message about needing to log out and back in to make it your default X11 server, but, of course, that doesn't help. XQuartz hasn't changed since 2016, but seems to be fine on Mojave.



More information about the Tkinter-discuss mailing list