<s> import argparse <EOL> from vex import exceptions <EOL> def make_arg_parser ( ) : <EOL> """<STR_LIT>""" <EOL> parser = argparse . ArgumentParser ( <EOL> formatter_class = argparse . RawTextHelpFormatter , <EOL> usage = "<STR_LIT>" , <EOL> ) <EOL> make = parser . add_argument_group ( title = '<STR_LIT>' ) <EOL> make . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> action = "<STR_LIT:store_true>" , <EOL> help = "<STR_LIT>" <EOL> ) <EOL> make . add_argument ( <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" , <EOL> default = None , <EOL> ) <EOL> make . add_argument ( <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , <EOL> ) <EOL> make . add_argument ( <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" , <EOL> ) <EOL> remove = parser . add_argument_group ( title = '<STR_LIT>' ) <EOL> remove . add_argument ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> action = "<STR_LIT:store_true>" , <EOL> help = "<STR_LIT>" <EOL> ) <EOL> parser . add_argument ( <EOL> "<STR_LIT>" , <EOL> metavar = "<STR_LIT>" , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> metavar = "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" , <EOL> default = '<STR_LIT:.>' , <EOL> help = "<STR_LIT>" , <EOL> ) <EOL> parser . add_argument ( <EOL> "<STR_LIT>" , <EOL> metavar = "<STR_LIT>" , <EOL> default = None , <EOL> action = "<STR_LIT:store>" , <EOL> help = "<STR_LIT>" <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> metavar = "<STR_LIT>" , <EOL> dest = "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" , <EOL> default = None , <EOL> help = "<STR_LIT>" <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> metavar = "<STR_LIT>" , <EOL> nargs = "<STR_LIT:?>" , <EOL> const = "<STR_LIT>" , <EOL> default = None , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store>" <EOL> ) <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" , <EOL> action = "<STR_LIT:store_true>" <EOL> ) <EOL> parser . add_argument ( <EOL> "<STR_LIT>" , <EOL> nargs = argparse . REMAINDER , <EOL> help = argparse . SUPPRESS ) <EOL> return parser <EOL> def get_options ( argv ) : <EOL> """<STR_LIT>""" <EOL> arg_parser = make_arg_parser ( ) <EOL> options , unknown = arg_parser . parse_known_args ( argv ) <EOL> if unknown : <EOL> arg_parser . print_help ( ) <EOL> raise exceptions . UnknownArguments ( <EOL> "<STR_LIT>" . format ( unknown ) ) <EOL> options . print_help = arg_parser . print_help <EOL> return options </s>
