luminoso_api/v5_cli.py
def _print_csv(result):
    """Print a JSON list of JSON objects in CSV format."""
    if type(result) is not list:
        raise TypeError("output not able to be displayed as CSV.")
    first_line = result[0]
    w = csv.DictWriter(sys.stdout, fieldnames=sorted(first_line.keys()))
    w.writeheader()
    for line in result:
        w.writerow(line)
def _print_csv(result):
    if type(result) is not list:
        raise TypeError("output not able to be displayed as CSV.")
    first_line = result[0]
    w = csv.DictWriter(sys.stdout, fieldnames=sorted(first_line.keys()))
    w.writeheader()
    for line in result:
        w.writerow(line)
def _print_csv ( result ) : if type ( result ) is not list : raise TypeError ( "output not able to be displayed as CSV." ) first_line = result [ 0 ] w = csv . DictWriter ( sys . stdout , fieldnames = sorted ( first_line . keys ( ) ) ) w . writeheader ( ) for line in result : w . writerow ( line )
Print a JSON list of JSON objects in CSV format.
Print a JSON list of JSON objects in CSV format .