#NEWLINE# def __init__( self , app , stream = None , sort_by = ( 'time' , 'calls' ) , restrictions = ( ) , profile_dir = None ) : #NEWLINE# #INDENT# if ( not available ) : #NEWLINE# #INDENT# raise RuntimeError ( 'the profiler is not available because profile or pstat is not installed.' ) #NEWLINE# #UNINDENT# self . _app = app #NEWLINE# self . _stream = ( stream or sys . stdout ) #NEWLINE# self . _sort_by = sort_by #NEWLINE# self . _restrictions = restrictions #NEWLINE# self . _profile_dir = profile_dir