capybara/virtualenv/lib/python2.7/site-packages/pip/req/req_uninstall.py
def remove(self, auto_confirm=False):
        """Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True)."""
        if not self._can_uninstall():
            return
        if not self.paths:
            logger.info(
                "Can't uninstall '%s'. No files were found to uninstall.",
                self.dist.project_name,
            )
            return
        logger.info(
            'Uninstalling %s-%s:',
            self.dist.project_name, self.dist.version
        )

        with indent_log():
            paths = sorted(self.compact(self.paths))

            if auto_confirm:
                response = 'y'
            else:
                for path in paths:
                    logger.info(path)
                response = ask('Proceed (y/n)? ', ('y', 'n'))
            if self._refuse:
                logger.info('Not removing or modifying (outside of prefix):')
                for path in self.compact(self._refuse):
                    logger.info(path)
            if response == 'y':
                self.save_dir = tempfile.mkdtemp(suffix='-uninstall',
                                                 prefix='pip-')
                for path in paths:
                    new_path = self._stash(path)
                    logger.debug('Removing file or directory %s', path)
                    self._moved_paths.append(path)
                    renames(path, new_path)
                for pth in self.pth.values():
                    pth.remove()
                logger.info(
                    'Successfully uninstalled %s-%s',
                    self.dist.project_name, self.dist.version
                )
def remove(self, auto_confirm=False):
        """Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True)."""
        if not self._can_uninstall():
            return
        if not self.paths:
            logger.info(
                "Can't uninstall '%s'. No files were found to uninstall.",
                self.dist.project_name,
            )
            return
        logger.info(
            'Uninstalling %s-%s:',
            self.dist.project_name, self.dist.version
        )

        with indent_log():
            paths = sorted(self.compact(self.paths))

            if auto_confirm:
                response = 'y'
            else:
                for path in paths:
                    logger.info(path)
                response = ask('Proceed (y/n)? ', ('y', 'n'))
            if self._refuse:
                logger.info('Not removing or modifying (outside of prefix):')
                for path in self.compact(self._refuse):
                    logger.info(path)
            if response == 'y':
                self.save_dir = tempfile.mkdtemp(suffix='-uninstall',
                                                 prefix='pip-')
                for path in paths:
                    new_path = self._stash(path)
                    logger.debug('Removing file or directory %s', path)
                    self._moved_paths.append(path)
                    renames(path, new_path)
                for pth in self.pth.values():
                    pth.remove()
                logger.info(
                    'Successfully uninstalled %s-%s',
                    self.dist.project_name, self.dist.version
                )
def remove ( self , auto_confirm = False ) : if not self . _can_uninstall ( ) : return if not self . paths : logger . info ( "Can't uninstall '%s'. No files were found to uninstall." , self . dist . project_name , ) return logger . info ( 'Uninstalling %s-%s:' , self . dist . project_name , self . dist . version ) with indent_log ( ) : paths = sorted ( self . compact ( self . paths ) ) if auto_confirm : response = 'y' else : for path in paths : logger . info ( path ) response = ask ( 'Proceed (y/n)? ' , ( 'y' , 'n' ) ) if self . _refuse : logger . info ( 'Not removing or modifying (outside of prefix):' ) for path in self . compact ( self . _refuse ) : logger . info ( path ) if response == 'y' : self . save_dir = tempfile . mkdtemp ( suffix = '-uninstall' , prefix = 'pip-' ) for path in paths : new_path = self . _stash ( path ) logger . debug ( 'Removing file or directory %s' , path ) self . _moved_paths . append ( path ) renames ( path , new_path ) for pth in self . pth . values ( ) : pth . remove ( ) logger . info ( 'Successfully uninstalled %s-%s' , self . dist . project_name , self . dist . version )
Remove paths in ``self.paths`` with confirmation (unless
        ``auto_confirm`` is True).
Remove paths in self . paths with confirmation ( unless auto_confirm is True ) .