code: def main(args=None):
      "The function to execute when running hx"
      if args is None:
          args = sys.argv[1:]
      options, args = HendrixOptionParser.parse_args(args)
      options = vars(options)
  
      try:
          action = args[0]
      except IndexError:
          HendrixOptionParser.print_help()
          return
  
      exposeProject(options)
  
      options = djangoVsWsgi(options)
  
      options = devFriendly(options)
  
      redirect = noiseControl(options)
  
      try:
          launch(*args, **options)
      except Exception:
          chalk.red('\n Encountered an unhandled exception while trying to %s hendrix.\n' % action, pipe=chalk.stderr)
          raisf main(args=None):
      "The function to execute when running hx"
      if args is None:
          args = sys.argv[1:]
      options, args = HendrixOptionParser.parse_args(args)
      options = vars(options)
  
      try:
          action = args[0]
      except IndexError:
          HendrixOptionParser.print_help()
          return
  
      exposeProject(options)
  
      options = djangoVsWsgi(options)
  
      options = devFriendly(options)
  
      redirect = noiseControl(options)
  
      try:
          launch(*args, **options)
      except Exception:
          chalk.red('\n Encountered an unhandled exception while trying to %s hendrix.\n' % action, pipe=chalk.stderr)
          raise
docs: The function to execute when running hx