This file is indexed.

/usr/lib/python2.7/dist-packages/chaco/plugin/chaco_plugin.py is in python-chaco 4.4.1-1.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
""" Envisage 3 plugin for Chaco functionality.
"""

from envisage.api import Plugin
from traits.api import List


ID = 'chaco'
ICHACO_SESSION = ID + '.plugin.session_service.SessionService'


class ChacoPlugin(Plugin):
    """ Envisage 3 plugin for Chaco functionality.
    """

    id = ID
    name = 'Chaco plugin'

    #### Contributions to extension points made by this plugin #################

    # Extension point Ids.
    COMMANDS = 'envisage.plugins.python_shell.commands'


    contributed_commands = List(contributes_to=COMMANDS)

    def _contributed_commands_default(self):
        commands = [
            "from chaco.shell.commands import *",
        ]
        return commands

    #### Plugin interface ######################################################

    def start(self):
        """ Monkeypatch the Chaco shell subsystem.
        """
        from chaco import shell
        from chaco.shell import commands
        from chaco.plugin.workbench_session import WorkbenchSession

        commands.session = shell.session = WorkbenchSession(
            application=self.application)

        def show():
            """ Shows all the figure windows that have been created thus far, and
            creates a GUI main loop.  This function is useful in scripts to show plots and
            keep their windows open, and has no effect when used from the interpreter
            prompt.

            Inside Envisage, just raise the current window.
            """
            win = commands.session.active_window
            win.raise_window()

        commands.show = show