#NEWLINE# def freeze( self , query , format = 'csv' , filename = None , file_obj = None , **kwargs ) : #NEWLINE# #INDENT# self . _check_arguments ( filename , file_obj , format , self . _export_formats ) #NEWLINE# if filename : #NEWLINE# #INDENT# file_obj = open ( filename , 'w' ) #NEWLINE# #UNINDENT# exporter = self . _export_formats [ format ] ( query ) #NEWLINE# exporter . export ( file_obj , ** format ) #NEWLINE# if filename : #NEWLINE# #INDENT# file_obj . close ( )