def _get_spatialite_func(self, func):
        """
        Helper routine for calling SpatiaLite functions and returning
        their result.
        """
        cursor = self.connection._cursor()
        try:
            try:
                cursor.execute('SELECT %s' % func)
                row = cursor.fetchone()
            except:
                # Responsibility of caller to perform error handling.
                raise
        finally:
            cursor.close()
        return row[0]
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/gis/db/backends/spatialite/operations.py/SpatiaLiteOperations._get_spatialite_func/original