<s> from __future__ import division <EOL> from asciimatics . effects import Print , Clock <EOL> from asciimatics . renderers import FigletText , Rainbow <EOL> from asciimatics . scene import Scene <EOL> from asciimatics . screen import Screen <EOL> from asciimatics . exceptions import ResizeScreenError <EOL> import sys <EOL> def demo ( screen ) : <EOL> effects = [ <EOL> Print ( screen , Rainbow ( screen , FigletText ( "<STR_LIT>" ) ) , <EOL> y = screen . height // <NUM_LIT:2> - <NUM_LIT:8> ) , <EOL> Print ( screen , Rainbow ( screen , FigletText ( "<STR_LIT>" ) ) , <EOL> y = screen . height // <NUM_LIT:2> + <NUM_LIT:3> ) , <EOL> Clock ( screen , screen . width // <NUM_LIT:2> , screen . height // <NUM_LIT:2> , screen . height // <NUM_LIT:2> ) , <EOL> ] <EOL> screen . play ( [ Scene ( effects , - <NUM_LIT:1> ) ] , stop_on_resize = True ) <EOL> while True : <EOL> try : <EOL> Screen . wrapper ( demo ) <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> except ResizeScreenError : <EOL> pass </s>
