def _pip_main(self, *args):
"""Run pip.main with the specified ``args``
"""
if self.quiet:
import logging
pip_log = logging.getLogger("pip")
_level = pip_log.level
pip_log.setLevel(logging.CRITICAL)
elif self._should_color():
self._sys.stdout.write("\x1b[36m")
try:
self._pip.main(list(args))
finally:
if self.quiet:
pip_log.setLevel(_level)
elif self._should_color():
self._sys.stdout.write("\x1b[0m")
self._sys.stdout.flush()
评论列表
文章目录