<s> RAW_VALUE_BY_DEFAULT = False <EOL> def env_to_statement ( env ) : <EOL> '''<STR_LIT>''' <EOL> source_file = env . get ( '<STR_LIT:file>' , None ) <EOL> if source_file : <EOL> return '<STR_LIT>' % __escape ( source_file , env ) <EOL> execute = env . get ( '<STR_LIT>' , None ) <EOL> if execute : <EOL> return execute <EOL> name = env [ '<STR_LIT:name>' ] <EOL> value = __escape ( env [ '<STR_LIT:value>' ] , env ) <EOL> return '<STR_LIT>' % ( name , value , name ) <EOL> def __escape ( value , env ) : <EOL> raw = env . get ( '<STR_LIT>' , RAW_VALUE_BY_DEFAULT ) <EOL> if not raw : <EOL> value = '<STR_LIT:">' + value . replace ( '<STR_LIT:">' , '<STR_LIT>' ) + '<STR_LIT:">' <EOL> return value </s>
