This function is similar to read_csv, but it reads data from the
    list of <lines>.

fd = open("foo", "r")
data = chart_data.read_str(",", fd.readlines())

def read_str(delim=',', *lines):
    """This function is similar to read_csv, but it reads data from the
    list of <lines>.

fd = open("foo", "r")
data = chart_data.read_str(",", fd.readlines())"""

    data = []
    for line in lines:
        com = parse_line(line, delim)
        data.append(com)
    return data