#NEWLINE# def get_path( self , executable ) : #NEWLINE# #INDENT# if ( len ( self . userpath ) == 0 ) : #NEWLINE# #INDENT# if ( sublime . platform ( ) == 'osx' ) : #NEWLINE# #INDENT# updated_path = self . get_mac_path ( ) #NEWLINE# os . environ [ 'PATH' ] = updated_path #NEWLINE# self . userpath = updated_path #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sublime . platform == 'windows' ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sublime . platform == 'linux' ) : #NEWLINE# #INDENT# self . userpath = os . environ [ 'PATH' ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( sublime . platform ( ) == 'osx' ) : #NEWLINE# #INDENT# os . environ [ 'PATH' ] = self . userpath #NEWLINE# #UNINDENT# #UNINDENT# if ( ';' in self . userpath ) : #NEWLINE# #INDENT# paths = self . userpath . split ( ';' ) #NEWLINE# for path in paths : #NEWLINE# #INDENT# test_path = os . path . join ( path , executable ) #NEWLINE# if ( version_info [ 0 ] == 2 ) : #NEWLINE# #INDENT# if os . path . isfile ( unicode ( test_path ) ) : #NEWLINE# #INDENT# return path #NEWLINE# #UNINDENT# #UNINDENT# if os . path . isfile ( test_path ) : #NEWLINE# #INDENT# return path #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if os . path . islink ( test_path ) : #NEWLINE# #INDENT# return os . path . dirname ( os . path . realpath ( test_path ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ':' in self . userpath ) : #NEWLINE# #INDENT# paths = self . userpath . split ( ':' ) #NEWLINE# for path in paths : #NEWLINE# #INDENT# test_path = os . path . join ( path , executable ) #NEWLINE# if ( version_info [ 0 ] == 2 ) : #NEWLINE# #INDENT# if os . path . isfile ( unicode ( test_path ) ) : #NEWLINE# #INDENT# return path #NEWLINE# #UNINDENT# #UNINDENT# if os . path . isfile ( test_path ) : #NEWLINE# #INDENT# return paths #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if os . path . islink ( test_path ) : #NEWLINE# #INDENT# return os . path . dirname ( os . path . realpath ( test_path ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . userpath