diff options
author | 2009-07-28 04:44:28 +0100 | |
---|---|---|
committer | 2009-07-28 04:44:28 +0100 | |
commit | 4c05971e84cd1056e748bab07593454326c6a6d8 (patch) | |
tree | 12ba35a9ce314283fd09642f69020d7bc2838e86 /umodule.py | |
parent | Open uprofile branch (diff) | |
download | uselect-4c05971e84cd1056e748bab07593454326c6a6d8.tar.gz uselect-4c05971e84cd1056e748bab07593454326c6a6d8.tar.bz2 uselect-4c05971e84cd1056e748bab07593454326c6a6d8.zip |
uprofile structure done
improved filesystem/printsystem sharing
Diffstat (limited to 'umodule.py')
-rw-r--r-- | umodule.py | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -8,12 +8,10 @@ import re import os -from uio import PrintSystem -from uio import FileSystem from uio import Counter +from uio import filesystem +from uio import printsystem -filesystem = FileSystem() -printsystem = PrintSystem() modules_dir = '/usr/share/uselect/modules/' @@ -37,6 +35,8 @@ class Action: self.__class__ = Path else: self.__class__ = Sym + elif type == 'profile': + self.__class__ = ProfileAction else: raise UserWarning('Action "' + name + '" has no type set!') @@ -299,7 +299,14 @@ class Var(): string += value + separator return string + +class ProfileAction(Action): + def do_action(self, args): + print 'Done!' + def setup(self): + return + class Env(Action): def do_action(self, args): @@ -348,10 +355,11 @@ class Path(Action, Sym): class Module(): - def __init__(self, name = None , description = None , version = 'Undefined', author = 'Undefined'): - global filesystem + def __init__(self, name = None , description = None , \ + version = 'Undefined', author = 'Undefined', \ + _filesystem = None, _printsystem = None): + self.name = name - filesystem = filesystem self.description = description self.version = version self.author = author |