<s> import sys <EOL> import os <EOL> from time import localtime , strftime <EOL> import argparse <EOL> from argparse import RawTextHelpFormatter <EOL> from gdcmdtools . ls import GDLs <EOL> from gdcmdtools . base import BASE_INFO <EOL> from gdcmdtools . base import DEBUG_LEVEL <EOL> from gdcmdtools . perm import help_permission_text <EOL> import csv <EOL> import pprint <EOL> __THIS_APP = '<STR_LIT>' <EOL> __THIS_DESCRIPTION = '<STR_LIT>' <EOL> __THIS_VERSION = BASE_INFO [ "<STR_LIT:version>" ] <EOL> import logging <EOL> logger = logging . getLogger ( __THIS_APP ) <EOL> def test ( ) : <EOL> assert True <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> arg_parser = argparse . ArgumentParser ( <EOL> description = '<STR_LIT>' % <EOL> ( __THIS_APP , <EOL> __THIS_VERSION , <EOL> __THIS_DESCRIPTION , <EOL> BASE_INFO [ "<STR_LIT>" ] , <EOL> BASE_INFO [ "<STR_LIT:description>" ] ) , <EOL> formatter_class = RawTextHelpFormatter ) <EOL> arg_parser . add_argument ( <EOL> '<STR_LIT:id>' , <EOL> help = '<STR_LIT>' ) <EOL> arg_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> help = '<STR_LIT>' ) <EOL> now = strftime ( "<STR_LIT>" , localtime ( ) ) <EOL> arg_parser . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , default = '<STR_LIT>' % <EOL> ( __THIS_APP , __THIS_VERSION , now ) , help = '<STR_LIT>' ) <EOL> arg_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> action = '<STR_LIT:store_true>' , <EOL> help = '<STR_LIT>' ) <EOL> arg_parser . add_argument ( '<STR_LIT>' , '<STR_LIT>' , <EOL> help = '<STR_LIT>' ) <EOL> arg_parser . add_argument ( '<STR_LIT>' , <EOL> choices = DEBUG_LEVEL , <EOL> default = DEBUG_LEVEL [ - <NUM_LIT:1> ] , <EOL> help = '<STR_LIT>' ) <EOL> PERMISSION_METAVAR = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> arg_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> metavar = PERMISSION_METAVAR , <EOL> nargs = len ( PERMISSION_METAVAR ) , <EOL> help = "<STR_LIT>" + <EOL> '<STR_LIT:\n>' . join ( help_permission_text ) + <EOL> '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> args = arg_parser . parse_args ( ) <EOL> logger . setLevel ( getattr ( logging , args . debug . upper ( ) ) ) <EOL> logger . debug ( args ) <EOL> ls = GDLs ( args ) <EOL> try : <EOL> response = ls . run ( ) <EOL> except : <EOL> raise <EOL> logger . debug ( pprint . pformat ( response ) ) <EOL> sys . exit ( <NUM_LIT:0> ) </s>
