Example #1
0
#!/usr/bin/env python

"""I am *not* responsible if this causes severe physical or mental injury
"""

from terminate.term import display, stdout, Magic
        

try:
    while True:
        for c in Magic.COLORS.iterkeys():
            stdout.write(display(bg=c))
            stdout.move('down',4)
except KeyboardInterrupt:
    stdout.write(display('default'))
    print
    print "Interupt from keyboard. Exiting."
Example #2
0
#!/usr/bin/env python

from terminate.term import display, stdout, Magic

stdout.write(display('default'))
stdout.write("default text\n")

stdout.write("regular foreground test:\n")
for color in Magic.COLORS.iterkeys():
    stdout.write(display(fg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("regular background test:\n")
for color in Magic.COLORS.iterkeys():
    stdout.write(display(bg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("bright foreground test:\n")
stdout.write(display('bright'))
for color in Magic.COLORS.iterkeys():
    stdout.write(display(fg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("dim foreground test:\n")
stdout.write(display('dim'))
Example #3
0
#!/usr/bin/env python

from terminate.term import display, stdout, Magic

stdout.write(display('default'))
stdout.write("default text\n")

stdout.write("regular foreground test:\n")
for color in Magic.COLORS.iterkeys():
    stdout.write(display(fg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("regular background test:\n")
for color in Magic.COLORS.iterkeys():
    stdout.write(display(bg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("bright foreground test:\n")
stdout.write(display('bright'))
for color in Magic.COLORS.iterkeys():
    stdout.write(display(fg=color))
    stdout.write("    " + color + '\n')

stdout.write(display('default'))

stdout.write("dim foreground test:\n")
stdout.write(display('dim'))
Example #4
0
#!/usr/bin/env python
"""Outputs something like:
spaand eggs
george
"""

from terminate.term import stdout

stdout.write('spam')
stdout.move('left')
stdout.write('and')
stdout.move('right')
stdout.write('eggs')
stdout.move('left', 3)
stdout.move('down')
stdout.write('george')
print  # trailing newline
Example #5
0
#!/usr/bin/env python

"""Outputs something like:
spaand eggs
george
"""

from terminate.term import stdout

stdout.write('spam')
stdout.move('left')
stdout.write('and')
stdout.move('right')
stdout.write('eggs')
stdout.move('left',3)
stdout.move('down')
stdout.write('george')
print # trailing newline
Example #6
0
#!/usr/bin/env python
"""I am *not* responsible if this causes severe physical or mental injury
"""

from terminate.term import display, stdout, Magic

try:
    while True:
        for c in Magic.COLORS.iterkeys():
            stdout.write(display(bg=c))
            stdout.move('down', 4)
except KeyboardInterrupt:
    stdout.write(display('default'))
    print
    print "Interupt from keyboard. Exiting."