Sapan Bhatia | dbaf193 | 2013-09-03 11:28:52 -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 | |
Sapan Bhatia | d3d122e | 2013-09-03 11:58:50 -0400 | [diff] [blame] | 10 | """ |
Sapan Bhatia | dbaf193 | 2013-09-03 11:28:52 -0400 | [diff] [blame] | 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] |
Sapan Bhatia | d3d122e | 2013-09-03 11:58:50 -0400 | [diff] [blame] | 18 | """ |