#NEWLINE# def merlin_bin( ) : #NEWLINE# #INDENT# '\n    Return the path of the ocamlmerlin binary."\n    ' #NEWLINE# user_settings = sublime . load_settings ( 'Merlin.sublime-settings' ) #NEWLINE# merlin_path = user_settings . get ( 'ocamlmerlin_path' ) #NEWLINE# if merlin_path : #NEWLINE# #INDENT# return merlin_path #NEWLINE# #UNINDENT# if ( '/usr/local/bin' not in os . environ [ 'PATH' ] . split ( os . pathsep ) ) : #NEWLINE# #INDENT# os . environ [ 'PATH' ] += ( os . pathsep + '/usr/local/bin' ) #NEWLINE# #UNINDENT# opam_process = subprocess . Popen ( 'opam config var bin' , stdout = subprocess . PIPE , shell = True ) #NEWLINE# opam_bin_path = ( opam_process . stdout . read ( ) . decode ( 'utf-8' ) . rstrip ( ) + '/ocamlmerlin' ) #NEWLINE# if ( os . path . isfile ( opam_bin_path ) and os . access ( opam_bin_path , os . X_OK ) ) : #NEWLINE# #INDENT# return opam_bin_path #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return 'ocamlmerlin'