<s> from __future__ import division , print_function , unicode_literals <EOL> import sys <EOL> import os <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT:..>' ) ) <EOL> testinfo = "<STR_LIT>" <EOL> tags = "<STR_LIT>" <EOL> import cocos <EOL> from cocos . director import director <EOL> from cocos . sprite import Sprite <EOL> import pyglet <EOL> class PrintKey ( cocos . layer . Layer ) : <EOL> is_event_handler = True <EOL> def on_key_press ( self , key , modifiers ) : <EOL> print ( "<STR_LIT>" , key , modifiers ) <EOL> description = """<STR_LIT>""" <EOL> def main ( ) : <EOL> print ( description ) <EOL> director . init ( ) <EOL> bg_layer = cocos . layer . ColorLayer ( <NUM_LIT:255> , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:255> ) <EOL> test_layer = PrintKey ( ) <EOL> main_scene = cocos . scene . Scene ( bg_layer , test_layer ) <EOL> director . run ( main_scene ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
