Esempio n. 1
0
 def populate(self):
     """ Populates the list of lists with the files that are in the 
     database. """
     list_of_files = database.get_filenames()
     for list_ID,filename in list_of_files:
         words_in_file = database.get_words_from_file(list_ID)
         word_dict = {}
         for i in words_in_file:
             w = Word(i[1], i[2], i[3], i[4])
             word_dict[i[1]] = w
         self.view.left_list.model[filename] = word_dict
Esempio n. 2
0
 def __init__(self, master, student, ls):
     self.master = master
     self.student = student
     self.ls = ls
     self.words = database.get_words_from_file(ls[0])
     Frame.__init__(self, self.master, background="skyblue")
     self.attempts = 0
     self.word_count = 0
     self.current_word = self.words[self.word_count]
     self.result = []
     self.initialise_pics()
     self.create_widgets()