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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -