Example #1
0
 def importList(self):
     filename = tkFileDialog.askopenfilename(filetypes = (("Tldr Files", "*.tldr"),))
     if str(filename) == "":
         return
     tldr_parse = TldrParser(filename)
     list_name = filename[:-5].split('/')[-1]
     if self.db.importList(list_name, tldr_parse.getWordList(), tldr_parse.getSource(), tldr_parse.getDateEdited(), tldr_parse.getListSize()):
         self.lists_list_pane.insert(list_name)
     else:
         print "List with that name already exists!!!"
     self.db.commit()