def run_ginkgo():
    parser = argparse.ArgumentParser(prog="ginkgo", add_help=False)
    parser.add_argument("-v", "--version",
        action="version", version="%(prog)s {}".format(ginkgo.__version__))
    parser.add_argument("-h", "--help", action="store_true", help="""
        show program's help text and exit
        """.strip())
    parser.add_argument("-d", "--daemonize", action="store_true", help="""
        daemonize the service process
        """.strip())
    parser.add_argument("target", nargs='?', help="""
        service class path to run (modulename.ServiceClass) or
        configuration file path to use (/path/to/config.py)
        """.strip())
    args = parser.parse_args()
    if args.help:
        parser.print_help()
        if args.target:
            print# blank line
            try:
                app = setup_process(args.target)
                app.config.print_help()
            except __HOLE__, e:
                parser.error(e)
    else:
        if args.target:
            try:
                ControlInterface().start(args.target, args.daemonize)
            except RuntimeError, e:
                parser.error(e)
        else:
            parser.print_usage()
dataset/ETHPy150Open progrium/ginkgo/ginkgo/runner.py/run_ginkgo