While using os.path.getsize() and os.path.isfile, my script returns the .DS_Store file too which I do not need. How do I ignore those?
import os
root = "/Users/Siddhartha/Desktop/py scripts"
for item in os.listdir(root):
if os.path.isfile(os.path.join(root, item)):
print item