parameters: (browser, update_tryorder=1)
return_statement: return [None, None]
docstring: Attempt to synthesize a controller base on existing controllers.
  
      This is useful to create a controller when a user specifies a path to
      an entry in the BROWSER environment variable -- we can copy a general
      controller to operate using a specific installation of the desired
      browser in this way.
  
      If we can't create a controller in this way, or if there is no
      executable for the requested browser, return [None, None].
docstring_summary: Attempt to synthesize a controller base on existing controllers.
docstring_tokens: Attempt to synthesize a controller base on existing controllers .
function: def _synthesize(browser, update_tryorder=1):
      """Attempt to synthesize a controller base on existing controllers.
  
      This is useful to create a controller when a user specifies a path to
      an entry in the BROWSER environment variable -- we can copy a general
      controller to operate using a specific installation of the desired
      browser in this way.
  
      If we can't create a controller in this way, or if there is no
      executable for the requested browser, return [None, None].
  
      """
      cmd = browser.split()[0]
      if not _iscommand(cmd):
          return [None, None]
      name = os.path.basename(cmd)
      try:
          command = _browsers[name.lower()]
      except KeyError:
          return [None, None]
      # now attempt to clone to fit the new name:
      controller = command[1]
      if controller and name.lower() == controller.basename:
          import copy
          controller = copy.copy(controller)
          controller.name = browser
          controller.basename = os.path.basename(browser)
          register(browser, None, controller, update_tryorder)
          return [None, controller]
      return [None, None]
function_tokens: def _synthesize ( browser , update_tryorder = 1 ) : cmd = browser . split ( ) [ 0 ] if not _iscommand ( cmd ) : return [ None , None ] name = os . path . basename ( cmd ) try : command = _browsers [ name . lower ( ) ] except KeyError : return [ None , None ] # now attempt to clone to fit the new name: controller = command [ 1 ] if controller and name . lower ( ) == controller . basename : import copy controller = copy . copy ( controller ) controller . name = browser controller . basename = os . path . basename ( browser ) register ( browser , None , controller , update_tryorder ) return [ None , controller ] return [ None , None ]