def refreshTreeView(self): try: self.mainList.clear() idict={} str_name=gctrl.globalControl.uname str_email=gctrl.globalControl.email str_pwd=gctrl.globalControl.pword res=mrc.getlist(str_name,str_email,str_pwd,idict) print res if(res!=200 or 'return_value' not in idict): self.gladeMain.get_object("statusbar").push(0, '刷新列表失败:'+gctrl.codeToString(res)) else: itemlist=idict['return_value'] for lines in itemlist.split('\n'): print lines lines=lines.split('___SPLIT___') self.mainList.append([lines[0],int(lines[1])]) except Exception,e: print e self.gladeMain.get_object("statusbar").push(0, '刷新列表失败:请先登录或检查网络连接')