self.tmpext = self.romext[index].split(';') for rom in os.listdir(self.rompath[index]): for ext in self.tmpext: if ext.count(rom[-3].lower()) > 0: ## Checks if last three characters are in the romext list self.extlist.append(rom[-4]) ## Adds rom extension to list, along with dot(.) self.lstEmu.addItem(xbmcgui.ListItem(str(rom[0:-4]), index, "", "")) # # self.lblCount.setLabel(str(len(self.extlist))+' '+LANGUAGE[XBMC_LANGUAGE][9])