#NEWLINE# def _notify_osx( title , msg , icon_image ) : #NEWLINE# #INDENT# app_path = os . path . join ( this_dir , 'resources' , 'osx' , 'catkin build.app' ) #NEWLINE# open_exec = which ( 'open' ) #NEWLINE# if ( open_exec is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# command = [ open_exec , app_path , '--args' , title , msg ] #NEWLINE# terminal = os . environ . get ( 'TERM_PROGRAM' , None ) #NEWLINE# if ( terminal == 'Apple_Terminal' ) : #NEWLINE# #INDENT# command += [ '-activate' , 'com.apple.Terminal' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( terminal == 'iTerm.app' ) : #NEWLINE# #INDENT# command += [ '-activate' , 'com.googlecode.iterm2' ] #NEWLINE# #UNINDENT# #UNINDENT# subprocess . Popen ( command , stdout = subprocess . PIPE , stderr = subprocess . PIPE )