summaryrefslogtreecommitdiff
path: root/uio.py
diff options
context:
space:
mode:
authorSérgio Almeida <mephx.x@gmail.com>2009-07-28 05:52:42 +0100
committerSérgio Almeida <mephx.x@gmail.com>2009-07-28 05:52:42 +0100
commitae61b3e7ed94036f045091a79a4eecffe651547e (patch)
tree241049dcce74052f0d0580ddb3c8cee6dd839499 /uio.py
parentRevert "Added output to profile actions" (diff)
downloaduselect-ae61b3e7ed94036f045091a79a4eecffe651547e.tar.gz
uselect-ae61b3e7ed94036f045091a79a4eecffe651547e.tar.bz2
uselect-ae61b3e7ed94036f045091a79a4eecffe651547e.zip
ProfileAction structure and Argv parsing done
Diffstat (limited to 'uio.py')
-rw-r--r--uio.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/uio.py b/uio.py
index d99d958..610ebca 100644
--- a/uio.py
+++ b/uio.py
@@ -272,7 +272,7 @@ class PrintSystem:
self.print_table([[bold + action.name + reset, \
action.description]])
- def print_action(self, module, action):
+ def print_action(self, action):
self.print_table([[bold + action.description + reset, '']])
self.print_line('')
self.print_table(self.format_action(action))
@@ -312,18 +312,24 @@ class ProfilePrintSystem(PrintSystem):
def print_ui(self, profile = None, profiles = None, args = None, \
action = None):
- self.print_usage(profile = profile, action = action)
- self.print_line('')
+
if profile == None:
+ self.print_usage(profile = profile, action = action)
+ self.print_line('')
self.print_options()
self.print_line('')
self.print_profiles(profiles)
self.print_line('')
- elif profiles == None:
+ elif profiles == None and action == None:
+ self.print_usage(profile = profile, action = action)
+ self.print_line('')
self.print_profile(profile)
self.print_line('')
self.print_actions(profile)
self.print_line('')
+ else:
+ for line in action.output:
+ print line
def print_profiles(self, profiles):
self.print_line(highlight + space + 'Profiles:' + reset)
@@ -338,13 +344,6 @@ class ProfilePrintSystem(PrintSystem):
self.print_line(space * 4 + bold + 'Author:' + reset + space + \
profile.author + space + bold + 'Version:' + reset + space \
+ profile.version)
-
-
-
- def print_action(self, module, action):
- self.print_table([[bold + action.description + reset, '']])
- self.print_line('')
- self.print_table(self.format_action(action))
def print_version(self, version):
self.print_line(bold + 'Universal Profile Tool - ' \