<s> """<STR_LIT>""" <EOL> import sys <EOL> import time <EOL> from termsaverlib . screen . helper import ScreenHelperBase <EOL> from termsaverlib import constants <EOL> class TypingHelperBase ( ScreenHelperBase ) : <EOL> """<STR_LIT>""" <EOL> delay = None <EOL> """<STR_LIT>""" <EOL> line_delay = None <EOL> """<STR_LIT>""" <EOL> def typing_print ( self , text ) : <EOL> """<STR_LIT>""" <EOL> if self . delay is None : <EOL> self . delay = constants . Settings . CHAR_DELAY_SECONDS <EOL> if self . line_delay is None : <EOL> self . line_delay = <NUM_LIT:10> * self . delay <EOL> splitText = text . split ( '<STR_LIT:\n>' ) <EOL> for line in splitText : <EOL> for char in line : <EOL> sys . stdout . write ( char ) <EOL> if char != '<STR_LIT:U+0020>' : <EOL> time . sleep ( self . delay ) <EOL> sys . stdout . flush ( ) <EOL> sys . stdout . write ( '<STR_LIT:\n>' ) <EOL> time . sleep ( self . line_delay ) </s>
