Sapan Bhatia | 26d40bc | 2014-05-12 15:28:02 -0400 | [diff] [blame] | 1 | import os |
2 | |||||
3 | deleters = {} | ||||
4 | _path = os.path.join('.',os.path.dirname(__file__)) | ||||
5 | |||||
6 | _files = os.listdir(_path) | ||||
7 | _files = filter(lambda x:x.endswith('deleter.py'),_files) | ||||
8 | _files = map(lambda x:x.rstrip('.py'),_files) | ||||
9 | |||||
10 | """ | ||||
11 | for f in _files: | ||||
12 | m = __import__(f) | ||||
13 | deleter = getattr(m,f.title().replace('_','')) | ||||
14 | try: | ||||
15 | deleters[deleter.model].append(deleter) | ||||
16 | except KeyError: | ||||
17 | deleters[deleter.model]=[deleter] | ||||
18 | """ |