Exemple #1
0
    def update_grep_widget(self, word):
        """
        Update the suggestions widget if there are results
        """
        t1 = time.time()

        corpus_output = CEO.grep(word)
        if corpus_output:
            self.grep_widget.setHtml(corpus_output)

        t2 = time.time()
        time_taken = (t2-t1)*1000.0
        self.time_grep.setText('%0.3f ms' % time_taken)