diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 11:08:21 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 11:08:21 +0100 |
commit | 0b5c53076613fb0ee1fc5f412b16fc6e98b5b62b (patch) | |
tree | fbc8c752fb7a77dea9e5968b48b59dc4ea0ba5d7 | |
parent | 0cd63db79a1a2fbbe3068047a09178413a387d26 (diff) | |
download | morph-0b5c53076613fb0ee1fc5f412b16fc6e98b5b62b.tar.gz |
Proper implementation of sample plugin
-rw-r--r-- | morphlib/plugins/hello_plugin.py | 8 |
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') |