(d, exclude=set())
| 114 | |
| 115 | |
| 116 | def iter_files(d, exclude=set()): |
| 117 | for x in os.listdir(d): |
| 118 | if x in exclude: |
| 119 | continue |
| 120 | |
| 121 | fullfp = os.path.abspath(d + "/" + x) |
| 122 | if os.path.isfile(fullfp): |
| 123 | yield fullfp |
| 124 | elif os.path.isdir(fullfp): |
| 125 | for f in iter_files(fullfp, exclude): |
| 126 | yield f |
| 127 | |
| 128 | |
| 129 | class Crate(object): |