<s> """<STR_LIT>""" <EOL> from kivy . app import App <EOL> from kivy . clock import Clock <EOL> from kivy . lang import Builder <EOL> from kivy . properties import StringProperty , NumericProperty , BooleanProperty <EOL> _example_title_text = '<STR_LIT>' <EOL> _example_text = """<STR_LIT>""" <EOL> _kv_code = """<STR_LIT>""" <EOL> class LabelTextureSizeExample ( App ) : <EOL> valign = StringProperty ( '<STR_LIT>' ) <EOL> halign = StringProperty ( '<STR_LIT:left>' ) <EOL> shorten = BooleanProperty ( False ) <EOL> max_lines = NumericProperty ( <NUM_LIT:0> ) <EOL> def build ( self ) : <EOL> return Builder . load_string ( _kv_code ) <EOL> def on_start ( self ) : <EOL> widget_ids = self . root . ids <EOL> self . text_content_widgets = ( widget_ids . left_content , <EOL> widget_ids . right_content , <EOL> widget_ids . bottom_content ) <EOL> self . reset_words ( ) <EOL> def reset_words ( self ) : <EOL> Clock . unschedule ( self . add_word ) <EOL> for content_widget in self . text_content_widgets : <EOL> content_widget . text = _example_title_text <EOL> self . words = ( word for word in _example_text . split ( ) ) <EOL> self . add_word ( ) <EOL> def add_word ( self , dt = None ) : <EOL> try : <EOL> word = next ( self . words ) <EOL> except StopIteration : <EOL> return <EOL> for content_widget in self . text_content_widgets : <EOL> content_widget . text += word + '<STR_LIT:U+0020>' <EOL> pause_time = <NUM_LIT> * len ( word ) <EOL> if word . endswith ( '<STR_LIT:U+002C>' ) : <EOL> pause_time += <NUM_LIT> <EOL> Clock . schedule_once ( self . add_word , pause_time ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> LabelTextureSizeExample ( ) . run ( ) </s>
