<filename>tadataka/datasets/fileio.py<gh_stars>1-10
def decomment(fobj):
    for line in fobj:
        line = line.split("#")[0]  # preserve before '#'
        line = line.strip()  # line might contain whitespace(s). remove them
        if line == '':
            continue
        yield line

<filename>tadataka/datasets/fileio.py<gh_stars>1-10
def decomment(fobj):
    for line in fobj:
        line = line.split("#")[0]  # preserve before '#'
        line = line.strip()  # line might contain whitespace(s). remove them
        if line == '':
            continue
        yield line

# preserve before '#' # line might contain whitespace(s). remove them