#NEWLINE# def main( ) : #NEWLINE# #INDENT# cmd_conf = json . load ( open ( 'simple.json' ) , object_pairs_hook = OrderedDict ) #NEWLINE# cmd = clg . CommandLine ( cmd_conf ) #NEWLINE# args = cmd . parse ( ) #NEWLINE# print ( ( 'Print Namespace object: %s' % args ) ) #NEWLINE# print ( ( 'Print Namespace attributes: %s' % vars ( args ) ) ) #NEWLINE# print ( 'Iter arguments:' ) #NEWLINE# for ( arg , value ) in args : #NEWLINE# #INDENT# print ( ( '  %s: %s' % ( arg , value ) ) ) #NEWLINE# #UNINDENT# print ( ( "Access 'foo' option with attribute syntax: %s" % args . foo ) ) #NEWLINE# print ( ( "Access 'foo' option with list syntax: %s" % args [ 'foo' ] ) )