def get_words(self): try: words = get_all_words(current_container(), dictionaries.default_locale) spell_map = {w:dictionaries.recognized(*w) for w in words} except: import traceback traceback.print_exc() words = traceback.format_exc() spell_map = {} if self.cancel: self.end_work() else: self.work_finished.emit(words, spell_map)
def words_data(container, book_locale, *args): count, words = get_all_words(container, book_locale, get_word_count=True) return (count, tuple( Word(i, word, locale, v) for i, ((word, locale), v) in enumerate(iteritems(words))))
def words_data(container, book_locale, *args): count, words = get_all_words(container, book_locale, get_word_count=True) return (count, tuple(Word(i, word, locale, v) for i, ((word, locale), v) in enumerate(words.iteritems())))