Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1707)

Unified Diff: scripts/lilymidi.py

Issue 553420043: Switch to Python 3.x (Closed)
Patch Set: Remove coverage.py Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/etf2ly.py ('k') | scripts/lilypond-book.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/lilymidi.py
diff --git a/scripts/lilymidi.py b/scripts/lilymidi.py
index 7283f061d9e171b3e92e20e1d8784b1155730391..d83c1e2088c97935334b206e89f76562095e4261 100644
--- a/scripts/lilymidi.py
+++ b/scripts/lilymidi.py
@@ -170,38 +170,38 @@ def dump_event (ev, time, padding):
if f:
if len (ev) > 2:
- print padding + f.format (ev[1], ev[2])
+ print(padding + f.format (ev[1], ev[2]))
elif len (ev) > 1:
- print padding + f.format (ev[1])
+ print(padding + f.format (ev[1]))
else:
- print padding + f.format ()
+ print(padding + f.format ())
else:
- print padding + "Unrecognized MIDI event: " + str (ev);
+ print(padding + "Unrecognized MIDI event: " + str (ev));
def dump_midi (data, midi_file, options):
if not options.pretty:
- print data
+ print(data)
return
# First, dump general info, #tracks, etc.
- print "Filename: " + midi_file;
+ print("Filename: " + midi_file);
i = data[0];
m_formats = {0: 'single multi-channel track',
1: "one or more simultaneous tracks",
2: "one or more sequentially independent single-track patterns"}
- print "MIDI format: " + str (i[0]) + " (" + m_formats.get (i[0], "") + ")";
- print "Divisions: " + str (i[1]) + " per whole note";
- print "#Tracks: " + str ( len (data[1]))
+ print("MIDI format: " + str (i[0]) + " (" + m_formats.get (i[0], "") + ")");
+ print("Divisions: " + str (i[1]) + " per whole note");
+ print("#Tracks: " + str ( len (data[1])))
n = 0;
for tr in data[1]:
time = 0;
n += 1;
- print
- print "Track " + str(n) + ":"
- print " Time 0:"
+ print()
+ print("Track " + str(n) + ":")
+ print(" Time 0:")
for ev in tr:
if ev[0]>time:
time = ev[0]
- print " Time " + str(time) + ": "
+ print(" Time " + str(time) + ": ")
dump_event (ev[1], time, " ");
« no previous file with comments | « scripts/etf2ly.py ('k') | scripts/lilypond-book.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b