Exemplo n.º 1
0
#!/usr/bin/python3
from blessings import Terminal
t = Terminal()
print(t.clear())
print(t.bold("Hi, There!!"))
print(t.move_down)
print(t.bold_red_on_bright_green('It hurts my eyes!'))
print(t.move_down+t.bold_underline_black_on_bright_yellow('It hurts my eyes! blinking'))
print(t.move_down)
print("Terminal Width", t.width)
print("Terminal height", t.height)
print(t.move_down)
print(t.move_down)
print("one line for Terminal Width and hight",t.reverse, t.width, t.height)
with t.location(20, t.height - 1):
	print(t.reverse+t.blink('Blinking in REVERSE!!!!! '))
Exemplo n.º 2
0
#!/usr/bin/env python3
from blessings import Terminal
t = Terminal()
print(t.clear())
print(t.bold('Hi there!'))
print(t.move_down)
print(t.bold_red_on_bright_green('It hurts my eyes!'))
print(t.move_down + t.bold_underline_black_on_yellow(
    'Look! a 1997 web page! No, the font would have to be blinking'))
print(t.move_down)
print(" Terminal width: ", t.width)
print(" Terminal height: ", t.height)
print(t.move_down + "A one-liner way to show terminal width and height",
      t.reverse, t.width, "by", t.height, " ")
with t.location(20, t.height - 1):
    print(t.reverse + t.blink('This is at thebottom and printed in REVERSE. '))
Exemplo n.º 3
0
from blessings import Terminal

t = Terminal()

print(t.bold('This should be bold'))
print(t.black + t.on_red(' This should be red '))

print(t.bold_black_on_white('What does this look like?'))
print(t.reverse('Reversed'))
print(t.blink('Blink'))
print(t.underline('underline'))
print('H' + t.subscript('2'))  # Not working
print(t.standout('standout'))
print(t.shadow('shadow'))
print(t.italic('italic'))
print(t.number_of_colors)

print('This last word should be{t.bold} bold'.format(t=t))
print(t.clear)
for i in range(t.number_of_colors + 1):
    print(f'{t.color(i)}{i}', end=', ')