本文整理汇总了Python中WConio.textbackground方法的典型用法代码示例。如果您正苦于以下问题:Python WConio.textbackground方法的具体用法?Python WConio.textbackground怎么用?Python WConio.textbackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WConio
的用法示例。
在下文中一共展示了WConio.textbackground方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: put
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def put(x, y, s, fgc=None, bgc=None):
#-------------------------------------------------------------------------------
wc.gotoxy(x, y)
if bgc:
wc.textbackground(bgc)
if fgc:
wc.textcolor(fgc)
wc.cputs(s)
示例2: status
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def status(self, y, s):
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
wc.gotoxy(0, y)
wc.movetext(0, y, self.ex, self.ey -1, 0, y+1)
wc.gotoxy(0, y)
wc.textbackground(7)
wc.textcolor(15)
wc.clreol()
wc.cputs(s)
示例3: draw_box_text
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def draw_box_text(box, text=None):
if text is None:
text = box.text
W.textbackground(box.interior_background_color)
for line in text:
W.textcolor(line.color)
if line.right_justify:
W.gotoxy(box.left + box.width - line.x - len(line.text), box.top + line.y)
else:
W.gotoxy(box.left + line.x, box.top + line.y)
W.cputs(line.text)
示例4: emit
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def emit(self, record):
WConio = self.WConio
try:
msg = self.format(record)
levelname = record.levelname
out = sys.__stdout__ # in case redirected by filelogger, etc
if levelname in msg:
part1, part2 = msg.split(levelname, 1)
out.write(part1)
out.flush()
saved_color = WConio.gettextinfo()[4]
WConio.textattr( self.colormap.get(levelname,
WConio.LIGHTGREY) )
if levelname == 'CRITICAL': WConio.textbackground(WConio.RED)
WConio.cputs(levelname)
WConio.textattr(saved_color) # restore
print >> out, part2
else:
print >> out, msg
out.flush()
except:
self.handleError(record)
示例5: _otr
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def _otr():
WConio.textbackground(WConio.BLACK)
WConio.textcolor(WConio.LIGHTGREY)
示例6: textbackground
# 需要导入模块: import WConio [as 别名]
# 或者: from WConio import textbackground [as 别名]
def textbackground( color ) :
"""Modifie la couleur de fond de la console"""
if sys.flags.interactive == 0 :
WConio.textbackground( color )