#NEWLINE# def _display_help( self ) : #NEWLINE# #INDENT# 'Displays the possible command line arguemnts to the user and\n        exits' #NEWLINE# print ( '\n{} v{}\n{}\n{}' . format ( self . name , self . version , self . author , self . about ) ) #NEWLINE# self . _display_usage ( exit = False ) #NEWLINE# if self . _subcmds : #NEWLINE# #INDENT# print ( '\nSUB COMMANDS:' ) #NEWLINE# for sc in self . _subcmds : #NEWLINE# #INDENT# print ( '{}\t\t{}' . format ( sc . name , sc . about ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _flags : #NEWLINE# #INDENT# print ( '\nFLAGS:' ) #NEWLINE# for f in self . _flags : #NEWLINE# #INDENT# if ( f . short and f . long ) : #NEWLINE# #INDENT# print ( '{},{}\t' . format ( f . short , f . long ) , end = '' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if f . short : #NEWLINE# #INDENT# print ( '{}\t\t' . format ( f . short ) , end = '' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( '{}\t' . format ( f . long ) , end = '' ) #NEWLINE# #UNINDENT# #UNINDENT# print ( '{}' . format ( f . help ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _opts : #NEWLINE# #INDENT# print ( '\nOPTIONS:' ) #NEWLINE# for o in self . _opts : #NEWLINE# #INDENT# print ( o . short , end = '' ) #NEWLINE# if ( o . short and o . long ) : #NEWLINE# #INDENT# print ( ',' , end = '' ) #NEWLINE# #UNINDENT# print ( '{}={}\t{}' . format ( o . long , o . name , o . help ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _req_opts : #NEWLINE# #INDENT# print ( '\nREQUIRED OPTIONS:' ) #NEWLINE# for ro in self . _req_opts : #NEWLINE# #INDENT# print ( ro . short , end = '' ) #NEWLINE# if ( ro . short and ro . long ) : #NEWLINE# #INDENT# print ( ',' , end = '' ) #NEWLINE# #UNINDENT# print ( '{}={}\t\t{}' . format ( ro . long , ro . name , ro . help ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _req_pos_args : #NEWLINE# #INDENT# print ( '\nREQUIRED POSITIONAL ARGUMENTS:' ) #NEWLINE# for rpo in self . _req_pos_args : #NEWLINE# #INDENT# print ( '{}\t\t{}' . format ( rpo . name , rpo . help ) ) #NEWLINE# #UNINDENT# #UNINDENT# if self . _pos_args : #NEWLINE# #INDENT# print ( '\nOPTIONAL POSITIONAL ARGUMENTS:' ) #NEWLINE# for po in self . _pos_args : #NEWLINE# #INDENT# print ( '{}\t\t{}' . format ( po . name , po . help ) ) #NEWLINE# #UNINDENT# #UNINDENT# sys . exit ( 0 )