This file is indexed.

/usr/share/pyshared/PythonCard/tools/codeEditor/scriptlets/documentWordCount.py is in python-pythoncard 0.8.2-3.

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
import wx
from PythonCard import dialog, util

def wordCount(text):
    chars = len(text)
    words = len(text.split())
    # this doesn't always match the getNumberOfLines() method
    # so this should probably be changed
    lines = len(text.splitlines())
    return chars, words, lines

if bg.documentPath is None:
    filename = 'Untitled'
else:
    filename = os.path.basename(bg.documentPath)

dialog.MessageDialog(bg, "Document: %s\n" % filename + "%d chars, %d words, %d lines" % wordCount(util.normalizeEOL(bg.components.document.text)), 'Word Count', wx.ICON_INFORMATION | wx.OK)