def select( self, query, ns={} ):
		'Execute a python expression using data and ns namespace'
		ns.update( dict( _en=enumerate, _rc=xrange(self.rowcount),
			array=array.array ) )
		return eval( query, self.data, ns )
Execute a python expression using data and ns namespace
recipes/Python/577697_Simple_numeric_database/recipe-577697.py