本文整理汇总了Python中cjh.cli.Cli.ul方法的典型用法代码示例。如果您正苦于以下问题:Python Cli.ul方法的具体用法?Python Cli.ul怎么用?Python Cli.ul使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cjh.cli.Cli
的用法示例。
在下文中一共展示了Cli.ul方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_p_file
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def load_p_file():
"""load pickle file with Tk"""
global graph
graph = SHELL.open_p_file()
SHELL.msgtxt.set(
Cli.ul(graph.label.title(), width=SIZE*2+6) + str(graph))
graph.sh_obj = SHELL
示例2: fill
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def fill():
"""
Call the graphs fill() method and refresh the text of the message
widget.
"""
graph.fill(graph.color_chooser())
SHELL.msgtxt.set(Cli.ul(graph.label.title(), width=SIZE*2+6) + str(graph))
示例3: add_polynomial
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def add_polynomial():
"""
Dispatches appropriate dialogs, then plots
polynomial, adding it to the polynmial list.
"""
graph.add_polynomial()
SHELL.msgtxt.set(
Cli.ul(graph.label.title(), width=SIZE*2+6) + str(graph))
示例4: new_graph
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def new_graph():
"""
Load JSON skinfile if specified and create a new goban instance
"""
if ARGS is not None and ARGS.skin is not None:
plane = Goban(sh_obj=SHELL, size=SIZE, skinfile=ARGS.skin)
else: plane = Goban(size=SIZE, sh_obj=SHELL)
SHELL.msgtxt.set(Cli.ul(plane.label.title(), width=SIZE*2+6) + str(plane))
return plane
示例5: plot_point
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def plot_point():
"""
Calls color-chooser dialog, and dialog prompts, then plots
point.
"""
color = graph.color_chooser()
graph.prompt_point(color)
SHELL.msgtxt.set(
Cli.ul(graph.label.title(), width=SIZE*2+6) + str(graph))
示例6: _click_callback
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def _click_callback(event):
"""
Feedback to click event, i.e., places a stone/plots a point at the
spot clicked.
"""
SHELL.main_window.focus_set()
var1.set('clicked at {}, {}'.format(event.x, event.y))
cartes_tuple = pixel2cartesian(event.x, event.y)
color_ = graph.plane[cartes_tuple[0] + (graph.size // 2)][
(graph.size // 2) - cartes_tuple[1]].marker
if color_ == 'black':
color_ = 'white'
elif color_ == 'white':
color_ = 'empty' # THE CLASS SEEMS TO TAKE CARE OF HOSHI, etc.
elif color_ in ['empty', 'hoshi', 'x_axis', 'origin', 'y_axis']:
color_ = 'black'
graph.plot_point(*cartes_tuple, color=color_)
SHELL.msgtxt.set(Cli.ul(graph.label.title(), width=SIZE*2+6) + str(graph))
示例7: output
# 需要导入模块: from cjh.cli import Cli [as 别名]
# 或者: from cjh.cli.Cli import ul [as 别名]
def output(cls, msg, **kwargs):
"""Write text to the default message area"""
if 'heading' in kwargs:
msg = Cli.ul(kwargs['heading'], symbol='-', width=20) + msg
cls.msgtxt.set(msg)