Martin Falatic added the comment:

FYI, I'm currently using calls into Tkinter to get more detailed version info. 
Some methods work better than others... I've outlined my attempts below for 
reference (the last tcl_ver and tk_ver outputs are the ones I'm using, even 
though they are somewhat different in how they are written).

try:  # Python2
    import Tkinter as tk
except ImportError:  # Python3
    import tkinter as tk

root = tk.Tk()

tcl_ver = tk.TclVersion  # Typical but low precsion
tcl_ver = tk.Tcl().eval('info patchlevel')  # Works but uses eval()
tcl_ver = root.tcl.call('info', 'patchlevel')  # Fails (AttributeError)
tcl_ver = tk.Tcl().call('info', 'patchlevel')  # Works, using

tk_ver = tk.TkVersion  # Typical but low precsion
tk_ver = tk.Tk().eval('info patchlevel')  # Works but makes extra window, uses 
eval()
tk_ver = tk.Tk().call('info', 'patchlevel')  # Works but makes extra window
tk_ver = root.tk.call('info', 'patchlevel')  # Works, using

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23982>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to