diff --git a/examples/unfinished/python-ddp-client/ddp-client.py b/examples/unfinished/python-ddp-client/ddp-client.py index 17a1d15169..e2bb093155 100755 --- a/examples/unfinished/python-ddp-client/ddp-client.py +++ b/examples/unfinished/python-ddp-client/ddp-client.py @@ -168,16 +168,27 @@ class App(Cmd): def do_help(self, line): """The `help` command""" - log('') - log('call \n' - ' Calls a remote method\n' - ' Example: call createApp [{"name": "foo.meteor.com", ' - '"description": "bar"}]') - log('') - log('sub []\n' - ' Subscribes to a remote dataset\n' - ' Examples: `sub allApps` or `sub myApp ["foo.meteor.com"]`') - log('') + + msgs = { + 'call': ( + 'call \n' + ' Calls a remote method\n' + ' Example: call createApp ' + '[{"name": "foo.meteor.com", ' + '"description": "bar"}]'), + 'sub': ( + 'sub []\n' + ' Subscribes to a remote dataset\n' + ' Examples: `sub allApps` or `sub myApp ' + '["foo.meteor.com"]`'), + } + + line = line.strip() + if line and line in msgs: + return log('\n' + msgs[line]) + + for msg in msgs.values(): + log('\n' + msg) def next_id(self): """Calculates the next id for messages that will be sent to the