code: def main(args=sys.argv):
      
      usage = USAGE % ((args[0],) * 6)
  
      try:
          popts, args = getopt.getopt(args[1:], "l:f:F:o:O:P:LS:a:N:vhVHgsx")
      except getopt.GetoptError:
          print(usage, file=sys.stderr)
          return 2
  
      try:
          return main_inner(popts, args, usage)
      except Exception:
          if '-v' in dict(popts):
              print(file=sys.stderr)
              print('*' * 65, file=sys.stderr)
              print('An unhandled exception occurred while highlighting.',
                    file=sys.stderr)
              print('Please report the whole traceback to the issue tracker at',
                    file=sys.stderr)
              print('<https://bitbucket.org/birkenfeld/pygments-main/issues>.',
                    file=sys.stderr)
              print('*' * 65, file=sys.stderr)
              print(file=sys.stderr)
              raise
          import traceback
          info = traceback.format_exception(*sys.exc_info())
          msg = info[-1].strip()
          if len(info) >= 3:
              # extract relevant file and position info
              msg += '\n   (f%s)' % info[-2].split('\n')[0].strip()[1:]
          print(file=sys.stderr)
          print('*** Error while highlighting:', file=sys.stderr)
          print(msg, file=sys.stderr)
          print('*** If this is a bug you want to report, please rerun with -v.',
                file=sys.stderr)
          return 1
docs: Main command line entry point.