def convert_datamodel(source, destination, dry_run=0): destination = os.path.splitext(destination)[0] + ".mom" if dry_run: return momc(source, destination)
def compile_datamodels(self, resdir): for src, dest in self.iter_datamodels(resdir): print "compile datamodel", src, "->", dest self.mkpath(os.path.dirname(dest)) momc(src, dest)