simple script on a unix system (Mac) which seems to only return certain files True. Can’t figure out why:
workdir = '/Volumes/place/sub place'
def myFunc(bla, dir, flist):
for f in flist:
print f, os.path.isfile(f)
os.path.walk(workdir,myFunc,None)
Returns:
tests.py False
utils.py False
utils.pyc False
writeXmlForMpgInPath.py False
.DS_Store True
Playout False
Playout Masters False
Projects False
ProRes Masters False
Source False
Sydney Playout Masters False
Web Preview False
.AU009644-M.xml.swp False
.DS_Store True
.DS_Store True
.DS_Store True
.DS_Store True
You’re using the function wrong:
see also
os.walk, its nicer.