These are chat archives for django/django

Feb 2016
Arcady Usov
Feb 29 2016 15:37
@megapctr i understand that but now it's impassible - maybe in future do this, thank's!
Feb 29 2016 16:27

Hello! Can anyone tell me how can I make this python script ignore DS store files... very silly issue. I have this function, I've googled but I don't know where to put the code in my current function. Thank you!

def list_files(dir):
r = []
subdirs = [x[0] for x in os.walk(dir)]
for subdir in subdirs:
files = os.walk(subdir).next()2
if (len(files) > 0):
for file in files:
r.append(subdir + "/" + file)
return r

the_list = list_files(file_rep)

Feb 29 2016 17:38
Feb 29 2016 17:38
Laksh Arora
Feb 29 2016 17:44
@thejivester you can use startswith('.') to skip the DS store files though it will skip other hidden files too.