Skip to content

Instantly share code, notes, and snippets.

@Kovak
Created March 30, 2014 05:51
Show Gist options
  • Save Kovak/9868230 to your computer and use it in GitHub Desktop.
Save Kovak/9868230 to your computer and use it in GitHub Desktop.
import kivy
from kivy.clock import Clock
from kivy.uix.label import Label
from kivy.app import App
class newlabel(Label):
def __init__(self, **kwargs):
super(newlabel, self).__init__(**kwargs)
self.markup = True
self.counter=0
self.words = self.text.split(' ')
def example(self, *args):
self.counter += 1
print self.counter
words = self.text.split(' ')
if len(self.words) >= self.counter:
self.text = ''
#anim = Animation(size_hint=(1, .27), duration=1.7)
#anim.start(view)
newmessage = newlabel(text = "this is a test hello")
Clock.schedule_interval(newmessage.example, 3)
class TestApp(App):
def build(self):
pass
if __name__ == '__main__':
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment