summaryrefslogtreecommitdiff
path: root/uio.py
diff options
context:
space:
mode:
authorSérgio Almeida <mephx.x@gmail.com>2009-07-27 20:30:11 +0100
committerSérgio Almeida <mephx.x@gmail.com>2009-07-27 20:30:11 +0100
commit7344569e0efd98064ce305cd6f0db933327a9400 (patch)
tree427bfd4ee5eae95a4bfc1596b749f25d29f9a5ca /uio.py
parentFixed syntax typo on umodule.py (diff)
downloaduselect-7344569e0efd98064ce305cd6f0db933327a9400.tar.gz
uselect-7344569e0efd98064ce305cd6f0db933327a9400.tar.bz2
uselect-7344569e0efd98064ce305cd6f0db933327a9400.zip
Open uprofile branch
Diffstat (limited to 'uio.py')
-rw-r--r--uio.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/uio.py b/uio.py
index 6e48a29..013ea3e 100644
--- a/uio.py
+++ b/uio.py
@@ -34,9 +34,10 @@ class FileSystem:
self.environment = self.home + '/.uselect/'
if not os.path.exists(self.environment):
os.mkdir(self.environment)
- self.environment += 'bin/'
- if not os.path.exists(self.environment):
- os.mkdir(self.environment)
+ if not os.path.exists(self.environment + 'bin/'):
+ os.mkdir(self.environment + 'bin/')
+ if not os.path.exists(self.environment + 'env.d/'):
+ os.mkdir(self.environment + 'env.d/')
def get_env(self):
env = []
@@ -100,8 +101,10 @@ class FileSystem:
return
else:
return os.listdir(path)
+
def path_exists(self, path):
return os.path.exists(path)
+
def real_path(self, path):
return os.path.realpath(path)
@@ -232,7 +235,20 @@ class PrintSystem:
for line in action.output:
print(line)
return
-
+
+ def print_uprofile_ui(self, profile = None, profiles = None, args = None):
+ if profile == None:
+ self.print_profiles(profiles)
+
+ def print_profiles(self, profiles):
+ self.print_line(bold + lime + 'Profiles:' + reset)
+ table = []
+ for profile in profiles:
+ table.append([bold + profile.name, profile.description])
+
+ self.print_table(table)
+
+
def print_module(self, module):
self.print_line(bold + lime + 'Module' + space + reset \
+ bold +module.name + lime + ':' + reset)