def __nextCore(self): line = n_core.getBlkDict(self.csvin, self.dptn) if line: return line n_core.close(self.csvin) n_core.cancel(self.shobj) return
def __nextCore(self): if self.header: self.header = False return self.fldname line = n_core.getLineList(self.csvin, self.dptn) if line: return line n_core.close(self.csvin) n_core.cancel(self.shobj) return
def __nextCore(self): data = n_core.getLineDictWithInfo(self.csvin, self.dptn) if data: breakTop = self.breakPre self.breakPre = data[1] return data[0], breakTop, data[1] n_core.close(self.csvin) n_core.cancel(self.shobj) return
def convtype(self,dtype=None,header=False): try: x = itermod.LineListIter(self,dtype) while(True): v = next(x) if v==None: break yield v return except GeneratorExit: n_core.close(x.csvin) n_core.cancel(x.shobj)
def fldname(self): dupobj = copy.deepcopy(self) # 不要 mod 除去 itobj = dupobj.redirect(dupobj.nowdir) xx = itermod.LineListIter(itobj) head = xx.fldname n_core.close(xx.csvin) n_core.cancel(xx.shobj) return head
def __getLineDictWithInfo(self,keys,skeys=None,dtype=None,q=False): try: x = itermod.LineDictIterWithInfo(self,keys,skeys,dtype,q) while(True): v = next(x) if v==None: break yield v return except GeneratorExit: n_core.close(x.csvin) n_core.cancel(x.shobj)
def __iter__(self): try: x = itermod.LineListIter(self) while(True): v = next(x) if v==None: break yield v return except GeneratorExit: n_core.close(x.csvin) n_core.cancel(x.shobj)
def __nextCore(self): if self.header: self.header = False return self.fldname, None, None data = n_core.getLineListWithInfo(self.csvin, self.dptn) if data: breakTop = self.breakPre self.breakPre = data[1] return data[0], breakTop, data[1] n_core.close(self.csvin) n_core.cancel(self.shobj) return
def __getBlockList(self,keys,skeys=None,dtype=None,q=False,header=False): try: x = itermod.BlkListIter(self,keys,skeys,dtype,q,header) while(True): v = next(x) if v==None: break yield v return except GeneratorExit: n_core.close(x.csvin) n_core.cancel(x.shobj)