parameters: (self)
docstring: Initializes settings from command-line arguments.
docstring_summary: Initializes settings from command-line arguments.
docstring_tokens: Initializes settings from command - line arguments .
function: def __init__(self):
      """Initializes settings from command-line arguments."""
      try:
        opts, _ = getopt.getopt(sys.argv[1:], "",
                                ["ssl", "js=", "proxy_host=", "proxy_port=",
                                 "urls_file=", "user_agent="])
      except getopt.GetoptError as err:
        print str(err)
        print ("Usage: devel/fetch_all.py [--ssl] [--js test_cat] "
               "[--proxy_host host] [--proxy_port port] [--urls_file file] "
               "[--user_agent user_agent]")
        sys.exit(2)
  
      self.ssl_mode = False
      self.js_mode = False
      self.has_user_agent = False
  
      for name, value in opts:
        if name == "--ssl":
          self.ssl_mode = True
        elif name == "--js":
          self.js_mode = True
          self.test_cat = value
        elif name == "--proxy_host":
          self.proxy_host = value
        elif name == "--proxy_port":
          self.proxy_port = int(value)
        elif name == "--urls_file":
          self.urls_file = value
        elif name == "--user_agent":
          self.has_user_agent = True
          self.user_agent = value
function_tokens: def __init__ ( self ) : try : opts , _ = getopt . getopt ( sys . argv [ 1 : ] , "" , [ "ssl" , "js=" , "proxy_host=" , "proxy_port=" , "urls_file=" , "user_agent=" ] ) except getopt . GetoptError as err : print str ( err ) print ( "Usage: devel/fetch_all.py [--ssl] [--js test_cat] " "[--proxy_host host] [--proxy_port port] [--urls_file file] " "[--user_agent user_agent]" ) sys . exit ( 2 ) self . ssl_mode = False self . js_mode = False self . has_user_agent = False for name , value in opts : if name == "--ssl" : self . ssl_mode = True elif name == "--js" : self . js_mode = True self . test_cat = value elif name == "--proxy_host" : self . proxy_host = value elif name == "--proxy_port" : self . proxy_port = int ( value ) elif name == "--urls_file" : self . urls_file = value elif name == "--user_agent" : self . has_user_agent = True self . user_agent = value