Process tempita templated file and write out the result. The template file is expected to end in `.src` (e.g., `.c.src` or `.h.src`). Processing `npy_somefile.c.src` generates `npy_somefile.c`.
(fromfile, outfile)
| 20 | |
| 21 | |
| 22 | def process_and_write_file(fromfile, outfile): |
| 23 | """Process tempita templated file and write out the result. |
| 24 | |
| 25 | The template file is expected to end in `.src` |
| 26 | (e.g., `.c.src` or `.h.src`). |
| 27 | Processing `npy_somefile.c.src` generates `npy_somefile.c`. |
| 28 | |
| 29 | """ |
| 30 | process_file = get_processor() |
| 31 | content = process_file(fromfile) |
| 32 | with open(outfile, 'w') as f: |
| 33 | f.write(content) |
| 34 | |
| 35 | |
| 36 | def main(): |
no test coverage detected
searching dependent graphs…