2012-06-20 14 views

Respuesta

107

Sí, puede establecer la opción help en add_argument en argparse.SUPPRESS. Aquí hay un ejemplo del argparse documentation:

>>> parser = argparse.ArgumentParser(prog='frobble') 
>>> parser.add_argument('--foo', help=argparse.SUPPRESS) 
>>> parser.print_help() 
usage: frobble [-h] 

optional arguments: 
    -h, --help show this help message and exit 
+8

Ah, sí. ¡Gracias! Culpo a Python por tener demasiada documentación para su lib estándar;) –

Cuestiones relacionadas