コード例 #1
0
    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
コード例 #2
0
    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
コード例 #3
0
    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
コード例 #4
0
	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)
コード例 #5
0
	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
コード例 #6
0
	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)
コード例 #7
0
	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)
コード例 #8
0
    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
コード例 #9
0
	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)