(fromfile, tofile)
| 73 | f.write(pyxcontent) |
| 74 | |
| 75 | def process_tempita_pxi(fromfile, tofile): |
| 76 | import npy_tempita as tempita |
| 77 | |
| 78 | assert fromfile.endswith('.pxi.in') |
| 79 | assert tofile.endswith('.pxi') |
| 80 | with open(fromfile) as f: |
| 81 | tmpl = f.read() |
| 82 | pyxcontent = tempita.sub(tmpl) |
| 83 | with open(tofile, "w") as f: |
| 84 | f.write(pyxcontent) |
| 85 | |
| 86 | def process_tempita_pxd(fromfile, tofile): |
| 87 | import npy_tempita as tempita |