from pathlib import Path
import csv


def read_csv(path: Path, *args, **kwargs) -> csv.DictReader:
    """Return a csv.DictReader, removing commented lines
    (which start with a #)."""
    csvfile = open(path, newline="")
    # skip comments
    return csv.DictReader(filter(lambda row: row[0] != "#", csvfile), *args, **kwargs)