本文整理汇总了Python中curses.ACS_LLCORNER属性的典型用法代码示例。如果您正苦于以下问题:Python curses.ACS_LLCORNER属性的具体用法?Python curses.ACS_LLCORNER怎么用?Python curses.ACS_LLCORNER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类curses
的用法示例。
在下文中一共展示了curses.ACS_LLCORNER属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: render_tree
# 需要导入模块: import curses [as 别名]
# 或者: from curses import ACS_LLCORNER [as 别名]
def render_tree(results, tree, level=0, prefix=[], node='/'):
# Exit condition
if node not in tree:
return
# Iteration
for i, line in enumerate(tree[node]):
cgroup = line['cgroup']
# Build name
if i == len(tree[node]) - 1:
line['_tree'] = prefix + [curses.ACS_LLCORNER, curses.ACS_HLINE, ' ']
_child_prefix = prefix + [' ', ' ', ' ']
else:
line['_tree'] = prefix + [curses.ACS_LTEE, curses.ACS_HLINE, ' ']
_child_prefix = prefix + [curses.ACS_VLINE, ' ', ' ']
# Commit, fold or recurse
results.append(line)
if cgroup not in CONFIGURATION['fold']:
render_tree(results, tree, level+1, _child_prefix, cgroup)
else:
line['_tree'] [-2] = '+'
示例2: box
# 需要导入模块: import curses [as 别名]
# 或者: from curses import ACS_LLCORNER [as 别名]
def box(self, window, x, y, w, h, color):
for i in xrange(1, w - 1):
window.addch(y, x + i, curses.ACS_HLINE, color)
window.addch(y + h - 1, x + i, curses.ACS_HLINE, color)
for i in xrange(1, h - 1):
window.addch(y + i, x, curses.ACS_VLINE, color)
window.addch(y + i, x + w - 1, curses.ACS_VLINE, color)
window.addch(y, x, curses.ACS_ULCORNER, color)
window.addch(y, x + w - 1, curses.ACS_URCORNER, color)
window.addch(y + h - 1, x, curses.ACS_LLCORNER, color)
window.addch(y + h - 1, x + w - 1, curses.ACS_LRCORNER, color)
示例3: bracket
# 需要导入模块: import curses [as 别名]
# 或者: from curses import ACS_LLCORNER [as 别名]
def bracket(self, window, x, y, h, color):
for i in xrange(1, h - 1):
window.addch(y + i, x, curses.ACS_VLINE, color)
window.addch(y, x, curses.ACS_ULCORNER, color)
window.addch(y + h - 1, x, curses.ACS_LLCORNER, color)
示例4: rectangle
# 需要导入模块: import curses [as 别名]
# 或者: from curses import ACS_LLCORNER [as 别名]
def rectangle(win, uly, ulx, lry, lrx):
"""Draw a rectangle with corners at the provided upper-left
and lower-right coordinates.
"""
win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1)
win.hline(uly, ulx+1, curses.ACS_HLINE, lrx - ulx - 1)
win.hline(lry, ulx+1, curses.ACS_HLINE, lrx - ulx - 1)
win.vline(uly+1, lrx, curses.ACS_VLINE, lry - uly - 1)
win.addch(uly, ulx, curses.ACS_ULCORNER)
win.addch(uly, lrx, curses.ACS_URCORNER)
win.addch(lry, lrx, curses.ACS_LRCORNER)
win.addch(lry, ulx, curses.ACS_LLCORNER)