parameters: (verbosity=0)
return_statement: return _run_pip(args + [p[0] for p in reversed(_PROJECTS)])
docstring: Helper to support a clean default uninstall process on Windows
  
      Note that calling this function may alter os.environ.
docstring_summary: Helper to support a clean default uninstall process on Windows
docstring_tokens: Helper to support a clean default uninstall process on Windows
function: def _uninstall_helper(verbosity=0):
      """Helper to support a clean default uninstall process on Windows
  
      Note that calling this function may alter os.environ.
      """
      # Nothing to do if pip was never installed, or has been removed
      try:
          import pip
      except ImportError:
          return
  
      # If the pip version doesn't match the bundled one, leave it alone
      if pip.__version__ != _PIP_VERSION:
          msg = ("ensurepip will only uninstall a matching version "
                 "({!r} installed, {!r} bundled)")
          print(msg.format(pip.__version__, _PIP_VERSION), file=sys.stderr)
          return
  
      _disable_pip_configuration_settings()
  
      # Construct the arguments to be passed to the pip command
      args = ["uninstall", "-y", "--disable-pip-version-check"]
      if verbosity:
          args += ["-" + "v" * verbosity]
  
      return _run_pip(args + [p[0] for p in reversed(_PROJECTS)])
function_tokens: def _uninstall_helper ( verbosity = 0 ) : # Nothing to do if pip was never installed, or has been removed try : import pip except ImportError : return # If the pip version doesn't match the bundled one, leave it alone if pip . __version__ != _PIP_VERSION : msg = ( "ensurepip will only uninstall a matching version " "({!r} installed, {!r} bundled)" ) print ( msg . format ( pip . __version__ , _PIP_VERSION ) , file = sys . stderr ) return _disable_pip_configuration_settings ( ) # Construct the arguments to be passed to the pip command args = [ "uninstall" , "-y" , "--disable-pip-version-check" ] if verbosity : args += [ "-" + "v" * verbosity ] return _run_pip ( args + [ p [ 0 ] for p in reversed ( _PROJECTS ) ] )