コード例 #1
0
 def scan(self, doc):
     """Scan document for new words."""
     text = doc.get_text(*doc.get_bounds())
     current_position = doc.get_iter_at_mark(doc.get_insert())
     line = current_position.get_line()
     self.completer = Completer()
     self.completer.evalsource(text, line)
     self.dictionary_words = ['teste1', 'teste2']