These are chat archives for django/django

29th
Feb 2016
Arcady Usov
@itcrab
Feb 29 2016 15:37
@megapctr i understand that but now it's impassible - maybe in future do this, thank's!
thejivester
@thejivester
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)

kdelinx
@kdelinx
Feb 29 2016 17:38
PING
and-nothing-else
@and-nothing-else
Feb 29 2016 17:38
PONG
Laksh Arora
@techedlaksh
Feb 29 2016 17:44
@thejivester you can use startswith('.') to skip the DS store files though it will skip other hidden files too.