This file is indexed.

/usr/lib/python2.7/dist-packages/mmllib/cmds.py is in python-mmllib 0.3.0.post1-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# ~*~ coding: utf-8 ~*~
#-
# Copyright © 2013, 2016, 2017
#       Dominik George <nik@naturalnet.de>
# Copyright © 2013, 2016
#       mirabilos <m@mirbsd.org>
#-
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
# is granted to deal in this work without restriction, including un‐
# limited rights to use, publicly perform, distribute, sell, modify,
# merge, give away, or sublicence.
#
# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
# the utmost extent permitted by applicable law, neither express nor
# implied; without malicious intent or gross negligence. In no event
# may a licensor, author or contributor be held liable for indirect,
# direct, other damage, loss, or other issues arising in any way out
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person’s immediate fault when using the work as intended.

""" Script entry points for use by setuptools """

import argparse
import sys
from pprint import pprint

from .musicxml import convert_mml_file
from .mml import mml
from .parser import mml_file
from .playlist import convert_to_timedlist, timedlist_duration, timedlist_ntracks

def mml2musicxml():
    """ Entry point for converting MML to MusicXML

    Returns 0 on success, >0 on error.
    """

    # parse arguments
    aparser = argparse.ArgumentParser()
    aparser.add_argument("path", help="path to the file to convert")
    args = aparser.parse_args()

    if hasattr(sys.stdout, "buffer"):
        sys.stdout.buffer.write(convert_mml_file(args.path))
    else:
        sys.stdout.write(convert_mml_file(args.path))
    sys.stdout.write("\n")
    return 0

def mmllint():
    """ Entry point for checking MML

    Returns 0 on success, >0 on error.
    """

    aparser = argparse.ArgumentParser()
    aparser.add_argument("path_or_mml", help="path to the file to check or mml string")
    aparser.add_argument("-q", "--quiet", help="only output final state", action="store_true")
    args = aparser.parse_args()
    if not args.path_or_mml.endswith(".mml"):
        playlist = [mml(args.path_or_mml)]
    else:
        playlist = mml_file(args.path_or_mml)
    timedlist, errors = convert_to_timedlist(playlist)

    if not args.quiet:
        pprint(timedlist)
    if len(timedlist):
        (highesttrack, ntracks) = timedlist_ntracks(timedlist)
        print("Tracks  : " + str(ntracks) + ", up to #" + str(highesttrack))
        print("Measures: " + str(len(timedlist)))
        print("Duration: " + str(timedlist_duration(timedlist)))
    if len(errors):
        for (track, barno, delta) in errors:
            if barno == 0:
                print("Error: missing track " + str(track))
            elif delta == 0:
                print("Error: track " + str(track) + " missing measure " + str(barno))
            else:
                print("Error: underfull measure (-" +
                      str(delta) + "s) in track " + str(track) +
                      ", measure " + str(barno))
        return 1
    else:
        print("No errors.")
        return 0