(name, klass, instance=None, *, preferred=False)
Register a browser connector.
Register a browser connector.
Register a browser connector .
def register(name, klass, instance=None, *, preferred=False):
    """Register a browser connector."""
    with _lock:
        if _tryorder is None:
            register_standard_browsers()
        _browsers[name.lower()] = [klass, instance]

        # Preferred browsers go to the front of the list.
        # Need to match to the default browser returned by xdg-settings, which
        # may be of the form e.g. "firefox.desktop".
        if preferred or (_os_preferred_browser and name in _os_preferred_browser):
            _tryorder.insert(0, name)
        else:
            _tryorder.append(name)
def register ( name , klass , instance = None , * , preferred = False ) : with _lock : if _tryorder is None : register_standard_browsers ( ) _browsers [ name . lower ( ) ] = [ klass , instance ] # Preferred browsers go to the front of the list. # Need to match to the default browser returned by xdg-settings, which # may be of the form e.g. "firefox.desktop". if preferred or ( _os_preferred_browser and name in _os_preferred_browser ) : _tryorder . insert ( 0 , name ) else : _tryorder . append ( name )