On 4/1/2020 2:47 PM, Christian Gollwitzer wrote:
Am 01.04.20 um 19:22 schrieb Rich Shepard:
On Wed, 1 Apr 2020, Tony van der Hoff wrote:
How do I determine the installed version?
import tkinter
tkinter.TkVersion
8.6
Thanks, Tony. I was close, but still too far away.
This only shows you the major version. There have been many updates to
Tcl/Tk in "minor" releases, including lots of rework on Tk internals.
Therefore, you need the patchlevel. YOu can get this by
root.eval('info patchlevel')
Apfelkiste:Test chris$ python3
Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> root=tkinter.Tk()
>>> root.eval('info patchlevel')
'8.5.9'
Or run IDLE, select Help > About IDLE and the patchlevel is displayed.
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list