def run_command(self, options, args): if not args: self.parser.print_help() sys.exit(1) pkg = Package(args[0]) pkgname = pkg.name if not is_installed(pkgname): logger.error("`%s` is not installed." % pkgname) sys.exit(1) pkgbin = os.path.join(PATH_PYTHONS,pkgname,'bin') set_current_path(pkgbin) logger.info("Switched to %s" % pkgname)
def run_command(self, options, args): if not args: self.parser.print_help() sys.exit(1) pkg = Package(args[0]) pkgname = pkg.name if not is_installed(pkgname): logger.error("`%s` is not installed." % pkgname) sys.exit(1) pkgbin = os.path.join(PATH_PYTHONS, pkgname, 'bin') set_current_path(pkgbin) logger.info("Switched to %s" % pkgname)
def run_command(self, options, args): if not args: logger.info("Unrecognized command line argument: argument not found.") sys.exit(1) pkg = Package(args[0]) pkgname = pkg.name pkgdir = os.path.join(PATH_PYTHONS, pkgname) if not os.path.isdir(pkgdir): logger.info("`%s` is not installed." % pkgname) sys.exit(1) pkgbin = os.path.join(pkgdir,'bin') set_current_path('%s:%s' % (PATH_BIN, pkgbin)) logger.info("Switched to %s" % pkgname)