summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-11 11:08:21 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-11 11:08:21 +0100
commit0b5c53076613fb0ee1fc5f412b16fc6e98b5b62b (patch)
treefbc8c752fb7a77dea9e5968b48b59dc4ea0ba5d7 /morphlib
parent0cd63db79a1a2fbbe3068047a09178413a387d26 (diff)
downloadmorph-0b5c53076613fb0ee1fc5f412b16fc6e98b5b62b.tar.gz
Proper implementation of sample plugin
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/plugins/hello_plugin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/morphlib/plugins/hello_plugin.py b/morphlib/plugins/hello_plugin.py
index 5bd387db..b51c8b5c 100644
--- a/morphlib/plugins/hello_plugin.py
+++ b/morphlib/plugins/hello_plugin.py
@@ -20,5 +20,11 @@ import cliapp
class Hello(cliapp.Plugin):
def enable(self):
- print "enable hello"
+ self.app.add_subcommand('hello', self.hello)
+
+ def disable(self):
+ pass
+
+ def hello(self, args):
+ self.app.output.write('hello, world\n')