ignore the hidden files in python
import os
root = "/Users/Siddhartha/Desktop/py scripts"
for item in os.listdir(root):
if not item.startswith('.') and os.path.isfile(os.path.join(root, item)):
print item
Reference:
[1] https://stackoverflow.com/questions/15235823/how-to-ignore-hidden-files-in-python-functions