def initial_tag(self, local_first=True): for i in [0, 1, 2]: r_tag=RobotTag(i) temp=list() if local_first: if not r_tag.localstart(): return False else: if not r_tag.netstart(): return False tag_res=r_tag.result for j in range(len(tag_res)): temp.append((0, 0)) self.profile[i].extend(temp) return self.save_profile()
def get_tid(dbt): r_tag=RobotTag(dbt) #done_start=self.profile[self.dbt][tid][1] if not r_tag.localstart(): return False tag_res=r_tag.result msg=str() for i, name in enumerate(tag_res): msg+='%d.%s '%(i+1, name) if (i+1)%6 ==0: msg+='\n' msg+='\n这里面的第几个:' ret=input(transcode(msg)) ret-=1 return ret
def read_todo(self, tid=0, local_first=True): r_tag=RobotTag(self.dbt) r_list=RobotList(self.dbt) #done_start=self.profile[self.dbt][tid][1] if local_first: if not r_tag.localstart(): return False else: if not r_tag.netstart(): return False tag_res=r_tag.result tag_name=tag_res[tid] if local_first: if not r_list.localstart(tag_name): return False else: if not r_list.netstart(tag_name): return False #self.profile[self.dbt][tid]=(r_list.count, done_start) self.lists=r_list.result return True