4 def load_module(name, path, write_bytecode = False):
5 import importlib.machinery
6 old_val = sys.dont_write_bytecode
7 sys.dont_write_bytecode = not write_bytecode
8 module = importlib.machinery.SourceFileLoader(name, path).load_module()
9 sys.dont_write_bytecode = old_val
12 def make_zone(filename):
13 zonefile = load_module(os.path.basename(filename), filename)
14 zones = zonefile.__zones__
15 # TODO do something more clever with the zones
17 zone.write(sys.stdout)
19 if __name__ == "__main__":
20 for name in sys.argv[1:]: