@catch_config_error<EOL><INDENT>def parse_command_line(self, argv=None):<DEDENT>
argv = sys.argv[<NUM_LIT:1>:] if argv is None else argv<EOL>if argv and argv[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>argv = argv[<NUM_LIT:1>:] + ['<STR_LIT>']<EOL><DEDENT>if self.subcommands and len(argv) > <NUM_LIT:0>:<EOL><INDENT>subc, subargv = argv[<NUM_LIT:0>], argv[<NUM_LIT:1>:]<EOL>if re.match(r'<STR_LIT>', subc) and subc in self.subcommands:<EOL><INDENT>return self.initialize_subcommand(subc, subargv)<EOL><DEDENT><DEDENT>if '<STR_LIT>' in argv or '<STR_LIT>' in argv or '<STR_LIT>' in argv:<EOL><INDENT>self.print_description()<EOL>self.print_help('<STR_LIT>' in argv)<EOL>self.print_examples()<EOL>self.exit(<NUM_LIT:0>)<EOL><DEDENT>if '<STR_LIT>' in argv or '<STR_LIT>' in argv:<EOL><INDENT>self.print_version()<EOL>self.exit(<NUM_LIT:0>)<EOL><DEDENT>flags,aliases = self.flatten_flags()<EOL>loader = KVArgParseConfigLoader(argv=argv, aliases=aliases,<EOL>flags=flags)<EOL>config = loader.load_config()<EOL>self.update_config(config)<EOL>self.extra_args = loader.extra_args<EOL>
Parse the command line arguments.