parameters: (url)
docstring: Add a stat visitor specified using a URL string
  
      Stat visitors are specified using URLs on the following format:
      format://path[?param=value[;param=value]]
  
      The available formats are listed in the factories list. Factories
      are called with the path as the first positional parameter and the
      parameters are keyword arguments. Parameter values must be valid
      Python literals.
docstring_summary: Add a stat visitor specified using a URL string
docstring_tokens: Add a stat visitor specified using a URL string
function: def addStatVisitor(url):
      """Add a stat visitor specified using a URL string
  
      Stat visitors are specified using URLs on the following format:
      format://path[?param=value[;param=value]]
  
      The available formats are listed in the factories list. Factories
      are called with the path as the first positional parameter and the
      parameters are keyword arguments. Parameter values must be valid
      Python literals.
  
      """
  
      try:
          from urllib.parse import urlsplit
      except ImportError:
          # Python 2 fallback
          from urlparse import urlsplit
  
      parsed = urlsplit(url)
  
      try:
          factory = factories[parsed.scheme]
      except KeyError:
          fatal("Illegal stat file type '%s' specified." % parsed.scheme)
  
      if factory is None:
          fatal("Stat type '%s' disabled at compile time" % parsed.scheme)
  
      outputList.append(factory(parsed))
function_tokens: def addStatVisitor ( url ) : try : from urllib . parse import urlsplit except ImportError : # Python 2 fallback from urlparse import urlsplit parsed = urlsplit ( url ) try : factory = factories [ parsed . scheme ] except KeyError : fatal ( "Illegal stat file type '%s' specified." % parsed . scheme ) if factory is None : fatal ( "Stat type '%s' disabled at compile time" % parsed . scheme ) outputList . append ( factory ( parsed ) )