- self.song = loadSong(self.file)\r
- key = os.path.basename(self.file)[:-5]\r
- if key in reversedReadabilityDict : \r
- label = self.createLabel(reversedReadabilityDict[key])\r
- else :\r
- label = self.createLabel(key)\r
+ if self.file.endswith('.smwi') :\r
+ self.song = loadSong(self.file)\r
+ key = os.path.basename(self.file)[:-5]\r
+ if key in reversedReadabilityDict : \r
+ label = self.createLabel(reversedReadabilityDict[key])\r
+ else :\r
+ label = self.createLabel(key)\r
+ elif self.file.endswith('.xml') :\r
+ self.song = musicXml2Song(self.file, printNotes=True)\r
+ filename = os.path.basename(self.file)\r
+ label = self.createLabel(filename) \r