Added venv command

This commit is contained in:
utahta
2011-07-21 02:14:41 +09:00
parent ef4ff75630
commit b4a6674fba
11 changed files with 133 additions and 68 deletions
+5 -5
View File
@@ -3,7 +3,8 @@ import re
from pythonbrew.basecommand import Command
from pythonbrew.define import PYTHON_VERSION_URL, LATEST_VERSIONS_OF_PYTHON,\
PATH_PYTHONS
from pythonbrew.util import Package, get_current_use_pkgname
from pythonbrew.util import Package, get_using_python_pkgname,\
get_using_python_path
from pythonbrew.log import logger
class ListCommand(Command):
@@ -36,15 +37,14 @@ class ListCommand(Command):
def installed(self, options, args):
logger.info('# installed pythons')
cur = get_current_use_pkgname()
cur = get_using_python_pkgname()
for d in sorted(os.listdir(PATH_PYTHONS)):
if cur and cur == d:
logger.info('%s (*)' % d)
cur = None
else:
logger.info('%s' % d)
if cur:
logger.info('%s (*)' % cur)
if not cur:
logger.info('%s (*)' % get_using_python_path())
def available_install(self, options, args):
logger.info('# available install pythons')