removed installed command. added some functions to bashrc.

This commit is contained in:
utahta
2010-11-25 23:14:19 +09:00
parent 5fadee8e92
commit 8e54618ff4
6 changed files with 35 additions and 48 deletions
-24
View File
@@ -1,24 +0,0 @@
import os
from subprocess import Popen, PIPE
from pythonbrew.basecommand import Command
from pythonbrew.define import PATH_PYTHONS
from pythonbrew.log import logger
from pythonbrew.util import get_current_python_path
class InstalledCommand(Command):
name = "installed"
usage = "%prog"
summary = "List the installed versions of python"
def run_command(self, options, args):
cur = get_current_python_path()
for d in sorted(os.listdir('%s/' % PATH_PYTHONS)):
if cur == os.path.join(PATH_PYTHONS, d, 'bin','python'):
logger.info('%s (*)' % d)
cur = None
else:
logger.info(d)
if cur:
logger.info('%s (*)' % cur)
InstalledCommand()