本文整理汇总了Python中maybe.T.green方法的典型用法代码示例。如果您正苦于以下问题:Python T.green方法的具体用法?Python T.green怎么用?Python T.green使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类maybe.T
的用法示例。
在下文中一共展示了T.green方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: filter_move
# 需要导入模块: from maybe import T [as 别名]
# 或者: from maybe.T import green [as 别名]
def filter_move(path_old, path_new):
if dirname(path_old) == dirname(path_new):
label = "rename"
path_new = basename(path_new)
else:
label = "move"
return "%s %s to %s" % (T.green(label), T.underline(path_old), T.underline(path_new)), 0
示例2: format_move
# 需要导入模块: from maybe import T [as 别名]
# 或者: from maybe.T import green [as 别名]
def format_move(path_old, path_new):
path_old = abspath(path_old)
path_new = abspath(path_new)
if dirname(path_old) == dirname(path_new):
label = "rename"
path_new = basename(path_new)
else:
label = "move"
return "%s %s to %s" % (T.green(label), T.underline(path_old), T.underline(path_new))