def readPictures(self): self.pictures = [] self.pictureNames = [] path = os.path.join(config.FACES_DIR, self.path) for fileName in train.walkFiles(path, '*.pgm'): self.pictures.append(QtGui.QPixmap(fileName)) self.pictureNames.append(fileName)