def get_index(self, filename):
        """Return index associated with filename"""
        index = self.fsmodel.index(filename)
        if index.isValid() and index.model() is self.fsmodel:
            return self.proxymodel.mapFromSource(index)
def get_index ( self , filename ) : index = self . fsmodel . index ( filename ) if index . isValid ( ) and index . model ( ) is self . fsmodel : return self . proxymodel . mapFromSource ( index )
Return index associated with filename