Oop, that was an "In Between My Ears Issue". I commented out the print statements trying to make it run in python3, but I completely forgot I made those changes. Sorry about that.
For future reference, there’s a 2to3 program (probably included with your python3 distribution) that can automagically convert a python2 program to python3 (I used that here and it worked fine).