I need to monitor a number of folders over a period of time. so i pass the files in each folder to a list of list.
import os
path_to_watch = []
path_to_watch.append("/path1/")
path_to_watch.append("/path2/")
path_to_watch.append("/path3/")
before = [],[]
for item, folder in enumerate(path_to_watch):
print "i am here", item, " : ", folder
before[item].append(dict ([(f, None) for f in os.listdir (folder)]))
were path1 to 3 are actual paths on my system
When it reaches the final folder it gives me the error
tuple index out of range
any ideas?