示例#1
0
文件: list.py 项目: Epictetus/pythonz
 def installed(self):
     logger.log("# Installed Python versions")
     cur = get_using_python_pkgname()
     for d in sorted(os.listdir(PATH_PYTHONS)):
         if cur and cur == d:
             logger.log('  %s (*)' % d)
         else:
             logger.log('  %s' % d)
示例#2
0
 def run_command(self, options, args):
     if args:
         # Uninstall pythons
         for arg in args:
             pkg = Package(arg, options.type)
             pkgname = pkg.name
             if not is_installed(pkg):
                 logger.error("`%s` is not installed." % pkgname)
                 continue
             if get_using_python_pkgname() == pkgname:
                 off()
             rm_r(os.path.join(PATH_PYTHONS, pkgname))
     else:
         self.parser.print_help()