def parse(filename):
    """
    Read a DXF file and break it into (group, data) tuples.

    Arguments:
        filename: Name of a DXF file to read.

    Returns:
        A list of (group, data) tuples.
    """
    with open(filename, encoding='cp1252') as dxffile:
        lines = dxffile.readlines()
    lines = [ln.strip() for ln in lines]
    data = list(zip(lines[::2], lines[1::2]))
    return [(int(g), d) for g, d in data]