1 #Definicion del comando Abrir Carpeta 2 def showAddFolder(self, widget): 3 self.filterbox.set_name("All Media Files") 4 for names, patterns in filepattern: 5 self.filterbox.add_pattern(patterns) 6 7 self.addfolder.add_filter(self.filterbox) 8 9 respt = self.addfolder.run() 10 self.addfolder.remove_filter(self.filterbox) 11 self.addfolder.hide() 12 13 if respt == -5: 14 addmultiple = self.addfolder.get_filename() 15 16 for root, dirs, filelist in os.walk(addmultiple): 17 for allfiles in [f for f in filelist if f.endswith(pattern)]: 18 self.medialist.append([allfiles,root])