diff options
Diffstat (limited to 'ranger/applications.py')
-rw-r--r-- | ranger/applications.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ranger/applications.py b/ranger/applications.py new file mode 100644 index 00000000..fd977c43 --- /dev/null +++ b/ranger/applications.py @@ -0,0 +1,15 @@ +ALLOWED_FLAGS = 'sdpSDP' + +class Applications(object): + def get(self, app): + try: + return getattr(self, 'app_' + app) + except AttributeError: + return self.app_default + + def has(self, app): + return hasattr(self, 'app_' + app) + + def all(self): + return [x for x in self.__dict__ if x.startswith('app_')] + |