def bind_object(value, app):
    if not value:
        # value is False when the GUI is stopped.
        return
    id = 'envisage.plugins.python_shell.view.python_shell_view.PythonShellView'
    py = app.workbench.active_window.get_view_by_id(id)

    id = 'tvtk.plugins.scene.i_scene_manager.ISceneManager'
    sm = app.workbench.active_window.get_service(id)
    if py is not None:
        py.bind('scene_manager', sm)
Binds the scene manager service to the Python shell.
dataset/ETHPy150Open enthought/mayavi/examples/tvtk/plugins/test.py/bind_object