def load( self, fname ):
		'Read and/or build db on to this database (FAST!)'
		cfg = cPickle.load( open(fname+'.cfg','rb') )
		schema, newrowcount = cfg
		if not hasattr( self, 'data' ):
			self.__init__( schema )
		for field in self.flist:
			fh = open( '%s__%s.dat' % (fname,field), 'rb' )
			try: self.data[ field ].fromfile( fh, newrowcount )
			except EOFError: pass
		self.rowcount += newrowcount
Read and/or build db on to this database (FAST!)
recipes/Python/577697_Simple_numeric_database/recipe-577697.py