Exemple #1
0
 def populate_lists(self):
     self.all = database.get_lists()
     self.all_names = []
     for l in self.all:
         self.all_names.append(l[1].split('/')[-1].split('.')[0])
     self.avail = database.get_available_lists(self.student[0])
     self.avail_names = []
     for l in self.avail:
         self.avail_names.append(l[1].split('/')[-1].split('.')[0])            
     for l in self.all_names:
         self.all_lister.listbox.insert(END, l)
     for l in self.avail_names:
         self.available_lister.listbox.insert(END, l)
Exemple #2
0
 def __init__(self, master, student):
     self.master = master
     self.student = student
     Frame.__init__(self, self.master, background="skyblue")
     self.avail = database.get_available_lists(self.student[0])
     self.avail_names = []
     for l in self.avail:
         self.avail_names.append(l[1].split('/')[-1].split('.')[0])
     self.initialise_pics()
     self.create_widgets()
     if len(self.avail) == 0:
         self.l['text'] = "It appears that your teacher hasn't\nmade any lists available"+ \
                          "to you. Come\nback later and check again."