old_contents: # -*- coding: utf-8 -*-
  # osascript -e 'tell app "System Events" to display dialog "Hello World"'
  from os import system
  
  
  def alert(msg):
      cmd = u"osascript -e 'tell app \"System Events\" to display " \
            "alert \"%s\"'" % msg
      system(cmd.encode("utf-8"))
  
new_contents: # -*- coding: utf-8 -*-
  from os import system
  
  
  def alert(msg, title=u'通知'):
      """
      osascript -e 'display notification "Lorem ipsum dolor sit amet"
      with title "Title"'
      """
      cmd = u"osascript -e 'display notification \"%s\" with title " \
            u"\"%s\"'" % (msg, title)
      print cmd
      system(cmd.encode("utf-8"))
  
subject: update mac.alert