cocos.layer.python_interpreter module — cocos v0.6.5 documentation

# cocos.layer.python_interpreter module

class `PythonInterpreterLayer`

  Bases: `cocos.layer.util_layers.ColorLayer`

  Runs an interactive Python interpreter as a child Layer of the current Scene.

  `draw`()
  `on_enter`()
  `on_exit`()
  `on_key_press`(symbol, modifiers)
  `on_resize`(x, y)
  `on_text`(symbol)
  `on_text_motion`(motion)
  `cfg` = {'code.font_name': 'Arial', 'code.font_size': 12, 'code.color': (255, 255, 255, 255), 'caret.color': (255, 255, 255)}
  `doing_more` = False
  `is_event_handler` = True

    enable pyglet’s events

  `name` = 'py'
  `prompt` = '>>> '

    python prompt

  `prompt_more` = '... '

    python ‘more’ prompt