Commit 2d0879b9 authored by Steve Goering's avatar Steve Goering

add missing files, and default help parameter for modules

parent 6c4805b0
This diff is collapsed.
......@@ -74,11 +74,6 @@ def handle_script(submodul, scriptfile, params=[]):
lInfo("start script")
lDbg("run: " + submodul + ", path: " + scriptfile)
"""
with this call, stdin and stdout is not simulatnious visible
output = shell_call([scriptfile] + params)
lInfo("output: \n" + output)"""
lInfo("output:")
cmd = " ".join([scriptfile] + params)
return_value = os.system(cmd)
......@@ -109,9 +104,9 @@ def main(args):
modules = get_modules(config)
parser = argparse.ArgumentParser(description='supercmd -- meta cmd controller', epilog="Steve Göring 2015")
parser = argparse.ArgumentParser(description='supercmd -- meta cmd controller', epilog="Steve Göring 2015", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('modul', type=str, choices=list(modules.keys()), help='modulname')
parser.add_argument('submodul', type=str, help='submodul')
parser.add_argument('submodul', type=str, nargs='?', default="help", help='submodul')
parser.add_argument('parameter', type=str, nargs='*', help='parameters for submodul command')
argsdict = vars(parser.parse_args(sys.argv[1:3])) # using sys.arv[..] is necessary because of unknown arguments in the parameters for submoduls
......
Markdown is supported
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