def send_notification_center(title, msg, gtype):
 if (sabnzbd.DARWIN_VERSION < 8):
  return T('Not available')
 tool = ncenter_path()
 if tool:
  try:
   command = [tool, '-title', title, '-message', msg, '-group', Tx(NOTIFICATION.get(gtype, 'other'))]
   proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
   output = proc.stdout.read()
   proc.wait()
   if (('Notification delivered' in output) or ('Removing previously' in output)):
    output = ''
  except:
   logging.info('Cannot run notifier "%s"', tool)
   logging.debug('Traceback: ', exc_info=True)
   output = 'Notifier tool crashed'
 else:
  output = 'Notifier app not found'
 return output.strip('*\n ')

def send_notification_center ( title , msg , gtype ) : if ( sabnzbd . DARWIN_VERSION < 8 ) : return T ( 'Not available' ) tool = ncenter_path ( ) if tool : try : command = [ tool , '-title' , title , '-message' , msg , '-group' , Tx ( NOTIFICATION . get ( gtype , 'other' ) ) ] proc = subprocess . Popen ( command , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = False ) output = proc . stdout . read ( ) proc . wait ( ) if ( ( 'Notification delivered' in output ) or ( 'Removing previously' in output ) ) : output = '' except : logging . info ( 'Cannot run notifier "%s"' , tool ) logging . debug ( 'Traceback: ' , exc_info = True ) output = 'Notifier tool crashed' else : output = 'Notifier app not found' return output . strip ( '*\n ' )
send message to mountain lions notification center .