Skip to content
Snippets Groups Projects
Commit 01842ae3 authored by Werner Alfons Hilda Van Geit's avatar Werner Alfons Hilda Van Geit
Browse files

Small change to the help interface

parent c8f10779
No related branches found
No related tags found
No related merge requests found
from bluepymm import prepare_combos, run_combos, select_combos
def _print_help():
prepare_combos.print_help()
print('')
run_combos.print_help()
print('')
select_combos.print_help()
def print_help(help_mode=None):
"""Print help"""
if help_mode == "prepare":
prepare_combos.print_help()
elif help_mode == "run":
run_combos.print_help()
elif help_mode == "select":
select_combos.print_help()
else:
print("""Usage:
bluepymm <command>
Commands:
prepare Prepare combos
run Run combos
select Select combos
help Show help for commands
""")
if help_mode is not None:
print("ERROR: Unknown command: %s" % help_mode)
def main(arg_list):
"""Main"""
print('\n##########################################################')
print('# Starting BluePyMM: Blue Brain Project Model Management #')
print('##########################################################\n')
print('\n######################################')
print('# Blue Brain Python Model Management #')
print('######################################\n')
if arg_list:
mode = arg_list[0]
......@@ -25,10 +41,14 @@ def main(arg_list):
run_combos.main(arg_list[1:])
elif mode == "select":
select_combos.main(arg_list[1:])
elif "help" in mode:
_print_help()
elif mode == "help":
try:
help_mode = arg_list[1]
except IndexError:
help_mode = None
print_help(help_mode=help_mode)
else:
print('Unknown command {}'.format(mode))
print('Known commands are: help, prepare, run, select')
print_help()
print("ERROR: Unknown command: %s" % mode)
else:
_print_help()
print_help()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment