Use print() for Python 3 compatibility.

This doesn't get everything working in Python 3 yet but it's a
start.
This commit is contained in:
Simon Howard 2014-02-04 02:12:50 +00:00
parent 83a44dbc39
commit b5d0a04088
4 changed files with 9 additions and 9 deletions

View file

@ -238,6 +238,6 @@ def read(filename):
if __name__ == "__main__":
for filename in sys.argv[1:]:
print filename
print read(filename)
print(filename)
print(read(filename))

View file

@ -205,11 +205,11 @@ if __name__ == "__main__":
fixed_note = instrument.fixed_note
if fixed_note is not None:
print "%i (fixed note: %i):" % (i, fixed_note)
print("%i (fixed note: %i):" % (i, fixed_note))
else:
print "%i:" % i
print("%i:" % i)
print "\tVoice 1: %s" % instrument.voice1
print("\tVoice 1: %s" % instrument.voice1)
if instrument.voice2 is not None:
print "\tVoice 2: %s" % instrument.voice2
print("\tVoice 2: %s" % instrument.voice2)

View file

@ -84,6 +84,6 @@ def write(filename, data):
if __name__ == "__main__":
for filename in sys.argv[1:]:
print filename
print read(filename)
print(filename)
print(read(filename))