Beispiel #1
0
	def asRawData(self):
		'''system: encode and answer decode dbf field definition 
		as 32-byte raw dbf data
		jjk  02/19/98'''
		rdl = [strutil.padTrailing(self.name, 11, chr(0)), 
			self.typeCode(),
			binnum.unsigned_as_Intel4(0),		#data address
			chr(self.length), 
			chr(self.decimalCount), 
			14*chr(0)]
		return(string.joinfields(rdl,''))
Beispiel #2
0
	def asRawData(self):
		'''system: encode and answer decode dbf field definition 
		as 32-byte raw dbf data
		jjk  02/19/98'''
		rdl = [strutil.padTrailing(self.name, 11, chr(0)), 
			self.typeCode(),
			binnum.unsigned_as_Intel4(0),		#data address
			chr(self.length), 
			chr(self.decimalCount), 
			14*chr(0)]
		return(string.joinfields(rdl,''))
Beispiel #3
0
	def encodeValue(self, fieldValue):
		'''system: answer raw data string encoded from a field value
		jjk  02/19/98'''
		rv = str(fieldValue)[:self.length]
		return(strutil.padTrailing(rv, self.length))
Beispiel #4
0
	def encodeValue(self, fieldValue):
		'''system: answer raw data string encoded from a field value
		jjk  02/19/98'''
		rv = str(fieldValue)[:self.length]
		return(strutil.padTrailing(rv, self.length))