(exclude=[], limit=5000)
return tags_opts
Read tags from a file. Each line is considered a tag.
Read tags from a file. Each line is considered a tag.
Read tags from a file . Each line is considered a tag .
def read_tags(exclude=[], limit=5000):
    """Read tags from a file. Each line is considered a tag. """
    # Get tags from a file
    tags_file = get_tags_file() or ''
    stream = open(tags_file, 'r') if os.path.exists(tags_file) else []
    stream = islice(zip(count(1), stream), limit)
    tags_opts = set()

    for idx, line in stream:
        line = line.strip()
        if line in exclude:
            continue
        tags_opts.add((line, False))

    return tags_opts
def read_tags ( exclude = [ ] , limit = 5000 ) : # Get tags from a file tags_file = get_tags_file ( ) or '' stream = open ( tags_file , 'r' ) if os . path . exists ( tags_file ) else [ ] stream = islice ( zip ( count ( 1 ) , stream ) , limit ) tags_opts = set ( ) for idx , line in stream : line = line . strip ( ) if line in exclude : continue tags_opts . add ( ( line , False ) ) return tags_opts