def format_for_columns(pkgs, options):
running_outdated = options.outdated<EOL>if running_outdated:<EOL><INDENT>header = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>header = ["<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>data = []<EOL>if options.verbose >= <NUM_LIT:1> or any(dist_is_editable(x) for x in pkgs):<EOL><INDENT>header.append("<STR_LIT>")<EOL><DEDENT>if options.verbose >= <NUM_LIT:1>:<EOL><INDENT>header.append("<STR_LIT>")<EOL><DEDENT>for proj in pkgs:<EOL><INDENT>row = [proj.project_name, proj.version]<EOL>if running_outdated:<EOL><INDENT>row.append(proj.latest_version)<EOL>row.append(proj.latest_filetype)<EOL><DEDENT>if options.verbose >= <NUM_LIT:1> or dist_is_editable(proj):<EOL><INDENT>row.append(proj.location)<EOL><DEDENT>if options.verbose >= <NUM_LIT:1>:<EOL><INDENT>row.append(get_installer(proj))<EOL><DEDENT>data.append(row)<EOL><DEDENT>return data, header<EOL>
Convert the package data into something usable
by output_package_listing_columns.