I am trying to list all HTML files in a directory using os.walk
but it returning none instead of file names
Here is my code
def read_dirctory():
matches = []
for root, dirnames, filenames in os.walk('/home/akallararajappan/www.mangalam.com/agriculture'):
for filename in fnmatch.filter(filenames, '*.html'):
matches.append(os.path.join(root, filename))
return matches
What is the problem here ? I am using Ubuntu 12.04. I have 1000 html files in the directory
output:
[]