'Get client associated with a given file.'

def get_client_for_file(self, filename):

    client = None
    for (idx, cl) in enumerate(self.get_clients()):
        if (self.filenames[idx] == filename):
            self.tabwidget.setCurrentIndex(idx)
            client = cl
            break
    return client
