Created
January 14, 2014 23:17
-
-
Save ryonagana/8427885 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import blessings | |
import time | |
from blessings import Terminal | |
term = Terminal() | |
print term.clear | |
class Text: | |
def __init__(self, text, delay, x=40, y=10): | |
self.text = text | |
self.delay = delay | |
self.x = x | |
self.y = y | |
def draw(self): | |
for l in range(0,len(self.text)): | |
with term.location(l,0): | |
#for d in range(self.delay): | |
# if(d == self.delay): | |
if(l == '\n'): | |
y += 1 | |
print term.green + term.on_black + self.text[l] | |
time.sleep(self.delay) | |
# self.dlay = 0; | |
if __name__ == "__main__": | |
t = Text("Wake Up Neo.\n\n How Are You?", 0.5) | |
while True: | |
with term.fullscreen(): | |
t.draw() | |
#while True: | |
# t.draw() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment