def get_wordlist(wordlist_name):
    """
    Get and iterator of specified word list.

    :param wordlist_name: Word list name
    :type wordlist_name: basestring

    :return: iterator with each line of file.
    :rtype: str
    """
    if not isinstance(wordlist_name, str):
        raise TypeError("Expected basestring, got '%s' instead" % type(wordlist_name))

    word_list_name = join(get_data_folder(), wordlist_name)

    try:
        with open(word_list_name, "rU") as f:
            for word in f:
                yield word.replace("\n", "").replace("\r", "")
    except __HOLE__ as e:
        raise PlecostWordListNotFound("Wordlist '%s' not found. Error: %s" % (wordlist_name, e))
dataset/ETHPy150Open iniqua/plecost/plecost_lib/libs/wordlist.py/get_wordlist