#NEWLINE# @ staticmethod #NEWLINE# def help_handler( docpie , flag ) : #NEWLINE# #INDENT# 'Default help(`--help`, `-h`) handler. print help string and exit.\n\n        By default, flag startswith `--` will print the full `doc`,\n        otherwith, print "Usage" section and "Option" section.\n        ' #NEWLINE# if flag . startswith ( '--' ) : #NEWLINE# #INDENT# print ( docpie . doc ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( docpie . usage_text ) #NEWLINE# option_sections = docpie . option_sections #NEWLINE# if option_sections : #NEWLINE# #INDENT# print ( '' ) #NEWLINE# print ( '\n' . join ( option_sections . values ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# sys . exit ( )