本文整理汇总了Python中tkinter.Tcl.split方法的典型用法代码示例。如果您正苦于以下问题:Python Tcl.split方法的具体用法?Python Tcl.split怎么用?Python Tcl.split使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tkinter.Tcl
的用法示例。
在下文中一共展示了Tcl.split方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: c_mainFrame
# 需要导入模块: from tkinter import Tcl [as 别名]
# 或者: from tkinter.Tcl import split [as 别名]
class c_mainFrame(Tk):
"""
classdocs
"""
def __init__(self, **paras):
"""
Constructor
"""
try:
super().__init__(**paras)
self.__check_enviroment()
self.system = self.tk.call("tk", "windowingsystem")
self.__mystyle()
self.__setup()
self.__create_children()
pass
except:
raise
else:
pass
def __del__(self):
try:
pass
except:
pass
else:
pass
def __check_enviroment(self):
try:
self.py_Version = platform.python_version()
self.py_Compiler = platform.python_compiler()
self.py_Build = platform.python_build()
major, minor, patch = self.py_Version.split(".")
if (int(major) < MIN_PY_MAJOR_VERSION) or (
(int(major) == MIN_PY_MAJOR_VERSION) and (int(minor) < MIN_PY_MINOR_VERSION)
):
raise Exception(
"Python Version " + MIN_TCL_MAJOR_VERSION + "." + MIN_TCL_MINOR_VERSION + ".x or higher required"
)
self.tcl_Version = Tcl().eval("info patchlevel")
major, minor, patch = self.tcl_Version.split(".")
if (int(major) < MIN_TCL_MAJOR_VERSION) or (
(int(major) == MIN_TCL_MAJOR_VERSION) and (int(minor) < MIN_TCL_MINOR_VERSION)
):
raise Exception(
"TCL Version " + MIN_TCL_MAJOR_VERSION + "." + MIN_TCL_MINOR_VERSION + ".x or higher required"
)
except:
raise
def __setup(self):
try:
self.option_add("*tearOFF", FALSE)
self.geometry("1024x640+10+10")
self.configure(title="Extended PTC Gateway")
pass
except:
pass
else:
pass
def __create_children(self):
try:
self.__create_menue()
pass
except:
raise
else:
pass
def __create_menue(self):
try:
self.frm_menu = ttk.Frame(self, name="menu")
ttk.Button(self.frm_menu, name="btn_new_file", text="New", command=self.__on_menu_new_file).pack(side=LEFT)
ttk.Button(self.frm_menu, name="btn_open_file", text="Open", command=self.__on_menu_open_file).pack(
side=LEFT
)
ttk.Button(
self.frm_menu, name="btn_save_file", text="Save", state="disabled", command=self.__on_menu_save_file
).pack(side=LEFT)
ttk.Button(
self.frm_menu,
name="btn_save_as_file",
text="SaveAs",
state="disabled",
command=self.__on_menu_save_as_file,
).pack(side=LEFT)
self.frm_menu.pack(side=TOP, fill=X)
pass
except:
#.........这里部分代码省略.........