#NEWLINE# def execute( self , script ) : #NEWLINE# #INDENT# env = os . environ . copy ( ) #NEWLINE# for path in global_settings ( 'path' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( sublime . platform ( ) , [ ] ) : #NEWLINE# #INDENT# env [ 'PATH' ] += ( os . pathsep + path ) #NEWLINE# #UNINDENT# proc = self . proc ( env , script ) #NEWLINE# if proc : #NEWLINE# #INDENT# print ( 'Running script:' , result ) #NEWLINE# result = proc . communicate ( ) [ 0 ] #NEWLINE# if ( proc . returncode == 0 ) : #NEWLINE# #INDENT# print ( 'script result:' , result . decode ( 'UTF-8' ) ) #NEWLINE# return result . decode ( 'UTF-8' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# s = 'error while processing script with {CMD}: {RESULT}' #NEWLINE# sublime . error_message ( s . format ( CMD = self . cmd , RESULT = result . decode ( 'UTF-8' ) ) )