本文整理汇总了Python中_tkinter.TCL_VERSION属性的典型用法代码示例。如果您正苦于以下问题:Python _tkinter.TCL_VERSION属性的具体用法?Python _tkinter.TCL_VERSION怎么用?Python _tkinter.TCL_VERSION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类_tkinter
的用法示例。
在下文中一共展示了_tkinter.TCL_VERSION属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_Tkinter
# 需要导入模块: import _tkinter [as 别名]
# 或者: from _tkinter import TCL_VERSION [as 别名]
def load_Tkinter(finder, module):
"""the Tkinter module has data files that are required to be loaded so
ensure that they are copied into the directory that is expected at
runtime."""
import Tkinter
import _tkinter
tk = _tkinter.create()
tclDir = os.path.dirname(tk.call("info", "library"))
# on OS X, Tcl and Tk are organized in frameworks, different layout
if sys.platform == 'darwin' and tk.call('tk', 'windowingsystem') == 'aqua':
tclSourceDir=os.path.join(os.path.split(tclDir)[0], 'Tcl')
tkSourceDir = tclSourceDir.replace('Tcl', 'Tk')
else:
tclSourceDir = os.path.join(tclDir, "tcl%s" % _tkinter.TCL_VERSION)
tkSourceDir = os.path.join(tclDir, "tk%s" % _tkinter.TK_VERSION)
finder.IncludeFiles(tclSourceDir, "tcl")
finder.IncludeFiles(tkSourceDir, "tk")