Skip to content

Instantly share code, notes, and snippets.

@ryonagana
Created January 14, 2014 23:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryonagana/8427885 to your computer and use it in GitHub Desktop.
Save ryonagana/8427885 to your computer and use it in GitHub Desktop.
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