def reloadLists(self): print 'RELOAD' LISTS_DIR = 'lists' curdir = os.path.abspath(os.path.curdir) LISTS_PATH = os.path.normpath(os.path.join(curdir, LISTS_DIR)) print LISTS_PATH awailable = self.lists['awailable'] awailable[:] = [] for list_file in os.listdir(LISTS_PATH): list_file_fullpath = os.path.join(LISTS_PATH, list_file) lst = list_check(list_file_fullpath) if lst.type != listtype.UNKNOWN: lst.path = list_file_fullpath print lst.type, lst.name awailable.append(lst) self.sortAwailable() self.displayAwailable()
def checkAwailableLists(self): lists_dir = self.settings['LISTS_PATH'] lists_path = os.path.join(os.path.abspath(os.path.curdir), lists_dir) self.aw_lists = [] self.sel_lists = [] for item in os.listdir(lists_path): item_fullpath = os.path.join(lists_path, item) data = list_check(item_fullpath) print 'DATA:', data if data != None: data['file'] = item_fullpath self.aw_lists.append(data) # print '',; # self.display_lists() self.sort_aw() self.display_aw() # self.root.update() self.sort_aw() self.display_aw()