<s> """<STR_LIT>""" <EOL> from __future__ import print_function , division , absolute_import , unicode_literals <EOL> import sys <EOL> from RPLCD import CharLCD <EOL> try : <EOL> range = xrange <EOL> except NameError : <EOL> pass <EOL> try : <EOL> safe_input = raw_input <EOL> except NameError : <EOL> safe_input = input <EOL> try : <EOL> unichr = unichr <EOL> except NameError : <EOL> unichr = chr <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if len ( sys . argv ) != <NUM_LIT:3> : <EOL> print ( '<STR_LIT>' % sys . argv [ <NUM_LIT:0> ] ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> rows , cols = int ( sys . argv [ <NUM_LIT:1> ] ) , int ( sys . argv [ <NUM_LIT:2> ] ) <EOL> lcd = CharLCD ( cols = cols , rows = rows ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> page = <NUM_LIT:0> <EOL> chars = rows * cols <EOL> try : <EOL> while True : <EOL> offset = page * chars <EOL> start = offset <EOL> end = offset + chars <EOL> lcd . clear ( ) <EOL> for i in range ( offset , offset + chars ) : <EOL> if i > <NUM_LIT:255> : <EOL> if i > start : <EOL> print ( '<STR_LIT>' % <EOL> ( page , start , i - <NUM_LIT:1> ) ) <EOL> else : <EOL> print ( '<STR_LIT>' ) <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> lcd . write_string ( unichr ( i ) ) <EOL> page += <NUM_LIT:1> <EOL> safe_input ( '<STR_LIT>' % <EOL> ( page , start , end - <NUM_LIT:1> ) ) <EOL> except KeyboardInterrupt : <EOL> print ( '<STR_LIT>' ) <EOL> lcd . clear ( ) </s>
