def dsvgen(filename,separator='|'):
    """generates a list of values for each line in a dsv file

    >>> for row in dsvgen('myfilename'): print row
    """
    inpfile=open(filename)
    for line in inpfile:
        yield line.strip().split(separator)
    inpfile.close()
generates a list of values for each line in a dsv file

    >>> for row in dsvgen('myfilename'): print row
    
recipes/Python/535172_Very_Simple_Delimiter_Separated_Values_File/recipe-535172.py