This file is indexed.

/usr/share/doc/python-gtk2-tutorial/html/examples/entrycompletion.py is in python-gtk2-tutorial 2.4-1.

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
#!/usr/bin/env python

import time
import pygtk
pygtk.require('2.0')
import gtk

class EntryCompletionExample:
    def __init__(self):
        window = gtk.Window()
        window.connect('destroy', lambda w: gtk.main_quit())
        vbox = gtk.VBox()
        label = gtk.Label('Type a, b, c or d\nfor completion')
        vbox.pack_start(label)
        entry = gtk.Entry()
        vbox.pack_start(entry)
        window.add(vbox)
        completion = gtk.EntryCompletion()
        self.liststore = gtk.ListStore(str)
        for s in ['apple', 'banana', 'cap', 'comb', 'color',
                  'dog', 'doghouse']:
            self.liststore.append([s])
        completion.set_model(self.liststore)
        entry.set_completion(completion)
        completion.set_text_column(0)
        completion.connect('match-selected', self.match_cb)
        entry.connect('activate', self.activate_cb)
        window.show_all()
        return

    def match_cb(self, completion, model, iter):
        print model[iter][0], 'was selected'
        return

    def activate_cb(self, entry):
        text = entry.get_text()
        if text:
            if text not in [row[0] for row in self.liststore]:
                self.liststore.append([text])
                entry.set_text('')
        return

def main():
    gtk.main()
    return

if __name__ == "__main__":
    ee = EntryCompletionExample()
    main()