#NEWLINE# def python_is_optimized( ) : #NEWLINE# #INDENT# 'Find if Python was built with optimizations.' #NEWLINE# import sysconfig #NEWLINE# cflags = ( sysconfig . get_config_var ( 'PY_CFLAGS' ) or '' ) #NEWLINE# final_opt = '' #NEWLINE# for opt in cflags . split ( ) : #NEWLINE# #INDENT# if opt . startswith ( '-O' ) : #NEWLINE# #INDENT# final_opt = cflags #NEWLINE# #UNINDENT# #UNINDENT# return ( ( final_opt != '' ) and ( final_opt != '-O0' ) )