This is the only line in the program that reads from the file, and it precedes the while loop:
char = inputFile.read(1)
Consequently, your loop keeps on processing the same letter over and over again forever, which happens to be a "T", in the case of this song. You never reach the end of the file, because you stopped reading it after only one byte.