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]
 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]

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 ] 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 ]
attempt to synthesize a controller base on existing controllers .