

def help_handler(pie, flag):
    print('Ok here is the help. But try to put some wrong command, to see how the customization is done.\n')
    if flag.startswith('--'):
        print(pie.doc)
        print('\nTry the following command:\n  my --sur name is "Slim Shady"\n  my --fami is Shady\n  my --given=name is Shady\n  my --given-name -- Slim\n  my name is Slim Shady\n  my name is "Slim Shady"\n')
    else:
        print(pie.usage_text)
        for (title, content) in pie.option_sections.items():
            if (title.lower() == 'hidden'):
                continue
            print(content)
        print('\nActually one option section is hidden. Try `--help` to see it')
    sys.exit()

dataset/ETHPy150Open TylerTemp/docpie/docpie/example/customize_output_and_exit_code.py help_handler/original