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'
>>>

(urks, I'll have to upgrade. 8.5.9 on OSX is seriously broken)

        Christian
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to