reduced examples
Showing
18 changed files
with
3 additions
and
221 deletions
| ... | @@ -139,13 +139,16 @@ def main(argv): | ... | @@ -139,13 +139,16 @@ def main(argv): |
| 139 | 139 | ||
| 140 | if recursive : | 140 | if recursive : |
| 141 | print folder | 141 | print folder |
| 142 | count=0 | ||
| 142 | for path, dirs, files in os.walk(folder): | 143 | for path, dirs, files in os.walk(folder): |
| 143 | for filename in files: | 144 | for filename in files: |
| 144 | fullpath = os.path.join(path, filename) | 145 | fullpath = os.path.join(path, filename) |
| 145 | if os.path.isfile(fullpath): | 146 | if os.path.isfile(fullpath): |
| 146 | engine(fullpath, fullpath, vars) | 147 | engine(fullpath, fullpath, vars) |
| 148 | count+=1 | ||
| 147 | else: | 149 | else: |
| 148 | print "file %s does not exists"%fullpath | 150 | print "file %s does not exists"%fullpath |
| 151 | print "successfully templated %s files"%str(count) | ||
| 149 | 152 | ||
| 150 | elif ifile != '': | 153 | elif ifile != '': |
| 151 | engine(ifile, ofile, vars ) | 154 | engine(ifile, ofile, vars ) | ... | ... |
-
Please register or sign in to post a comment