def parse_args():
parser = argparse.ArgumentParser(description = '<STR_LIT>',<EOL>add_help = True,<EOL>formatter_class = argparse.ArgumentDefaultsHelpFormatter,<EOL>)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>', default=False,<EOL>help='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>', default=False,<EOL>help='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>default='<STR_LIT>',<EOL>help='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>', default=False,<EOL>help='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>required=True,<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>required=False,<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>required=False, default=None,<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>required=False, default=None,<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>dest='<STR_LIT>',<EOL>action='<STR_LIT:store_true>', default=False,<EOL>help='<STR_LIT>',<EOL>)<EOL>parser.add_argument('<STR_LIT>',<EOL>nargs='<STR_LIT:+>',<EOL>help='<STR_LIT>',<EOL>metavar='<STR_LIT>'<EOL>)<EOL>args = parser.parse_args()<EOL>args.format = args.format.lower()<EOL>args.aes_key = args.aes_key.decode('<STR_LIT>')<EOL>if args.key_handle:<EOL><INDENT>args.key_handle = pyhsm.util.key_handle_to_int(args.key_handle)<EOL><DEDENT>if args.start_id is not None:<EOL><INDENT>try:<EOL><INDENT>n = int(args.start_id)<EOL><DEDENT>except ValueError:<EOL><INDENT>hexstr = pyhsm.yubikey.modhex_decode(args.start_id)<EOL>n = int(hexstr, <NUM_LIT:16>)<EOL><DEDENT>args.start_id = n<EOL><DEDENT>if args.stop_id is not None:<EOL><INDENT>try:<EOL><INDENT>n = int(args.stop_id)<EOL><DEDENT>except ValueError:<EOL><INDENT>hexstr = pyhsm.yubikey.modhex_decode(args.stop_id)<EOL>n = int(hexstr, <NUM_LIT:16>)<EOL><DEDENT>args.stop_id = n<EOL><DEDENT>if args.format == '<STR_LIT>':<EOL><INDENT>if not args.output_dir:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>return False<EOL><DEDENT>if not os.path.isdir(args.output_dir):<EOL><INDENT>sys.stderr.write("<STR_LIT>" % (args.output_dir))<EOL>return False<EOL><DEDENT>if not args.aes_key_out:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>return False<EOL><DEDENT>if not args.key_handle_out:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>return False<EOL><DEDENT>args.aes_key_out = args.aes_key_out.decode('<STR_LIT>')<EOL>args.key_handle_out_orig = args.key_handle_out <EOL>args.key_handle_out = pyhsm.util.key_handle_to_int(args.key_handle_out)<EOL><DEDENT>return args<EOL>
Parse the command line arguments