def setup_args(parser, config_files=[], ignore_unknown=False):
global args<EOL>arglist = sys.argv[<NUM_LIT:1>:]<EOL>for config_file in filter(os.path.isfile, config_files):<EOL><INDENT>arglist.insert(<NUM_LIT:0>, "<STR_LIT:@>" + config_file)<EOL><DEDENT>args, unknown = parser.parse_known_args(arglist)<EOL>if unknown and not ignore_unknown:<EOL><INDENT>msg = gettext('<STR_LIT>')<EOL>parser.error(msg % '<STR_LIT:U+0020>'.join(unknown))<EOL><DEDENT>if args.stream:<EOL><INDENT>args.stream = [stream.lower() for stream in args.stream]<EOL><DEDENT>if not args.url and args.url_param:<EOL><INDENT>args.url = args.url_param<EOL><DEDENT>
Parses arguments.