def process_tempita_pyd(fromfile, tofile): import npy_tempita as tempita assert fromfile.endswith('.pxd.in') assert tofile.endswith('.pxd') with open(fromfile, "r") as f: tmpl = f.read() pyxcontent = tempita.sub(tmpl) with open(tofile, "w") as f: f.write(pyxcontent)
def process_tempita_pxi(fromfile, tofile): import npy_tempita as tempita assert fromfile.endswith('.pxi.in') assert tofile.endswith('.pxi') with open(fromfile, "r") as f: tmpl = f.read() pyxcontent = tempita.sub(tmpl) with open(tofile, "w") as f: f.write(pyxcontent)
def process_tempita_pyx(fromfile, tofile): import npy_tempita as tempita assert fromfile.endswith('.pyx.in') with open(fromfile, "r") as f: tmpl = f.read() pyxcontent = tempita.sub(tmpl) pyxfile = fromfile[:-len('.pyx.in')] + '.pyx' with open(pyxfile, "w") as f: f.write(pyxcontent) process_pyx(pyxfile, tofile)