def main(argv):
  parser = optparse.OptionParser(usage=__doc__)
  parser.add_option('-s', '--server', dest='server',
                    help='The hostname your app is deployed on. '
                         'Defaults to <app_id>.appspot.com.')
  parser.add_option('-o', '--output', dest='filename', default=DEFAULT_FILE,
                    help='The file to which Appstats data must '
                         'be downloaded. A .pkl extension is '
                         'recommended. Defaults to %s.' % DEFAULT_FILE)
  parser.add_option('-p', '--path', dest='path',
                    help='The path on the server to the remote_api handler. '
                         'Defaults to %s for python and %s for java. '
                         % (DEFAULT_PATH_PYTHON, DEFAULT_PATH_JAVA))
  parser.add_option('-q', '--quiet',
                    action='store_false', dest='verbose', default=True,
                    help='do not print download status messages to stdout')
  parser.add_option('-j', '--java',
                    action='store_true', dest='java_application', default=False,
                    help='set this for downloading from a java application')
  parser.add_option('-m', '--merge',
                    action='store_true', dest='merge', default=False,
                    help='if file exists, merge rather than overwrite')
  parser.add_option('--secure', dest='secure', action='store_true',
                    default=False, help='Use HTTPS when communicating '
                                        'with the server.')
  parser.add_option('--appdir', dest='appdir', action='store', default='.',
                    help='application directory, for finding '
                         'appengine_config.py. Defaults to ".".')
  (options, args) = parser.parse_args()


  if ((not options.server and not args) or len(args) > 2
      or (options.path and len(args) > 1)):
    parser.print_usage(sys.stderr)
    if len(args) > 2:
      print >> sys.stderr, 'Unexpected arguments: %s' % args[2:]
    elif options.path and len(args) > 1:
      print >> sys.stderr, 'Path specified twice.'
    sys.exit(1)


  servername = options.server
  appid = None
  if options.java_application:
    default_path = DEFAULT_PATH_JAVA
  else:
    default_path = DEFAULT_PATH_PYTHON
  path = options.path or default_path
  if args:
    if servername:

      appid = args[0]
    else:

      servername = '%s.appspot.com' % args[0]
    if len(args) == 2:

      path = args[1]
  if options.verbose:


    logging.getLogger().setLevel(logging.INFO)
  download_appstats(servername, appid, path, options.secure,
                    appengine_rpc.HttpRpcServer, options.filename,
                    options.appdir, options.merge, options.java_application)
Create an attribute assertion response.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/download_appstats.py/main--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/server.py/Server.create_attribute_response