python - glob.iglob to find all .txt files in all sub-directories yields error -
simple code gives below error. it's directly docs (https://docs.python.org/3/library/glob.html)
typeerror: iglob() got unexpected keyword argument 'recursive'
import glob filename in glob.iglob('c:\\**\\*txt', recursive=true): print filename
it seems you're using python 2.7 , reading python 3.5 documentation.
Comments
Post a Comment