3 from zonemaker.zone import Zone
6 def load_module(name, path, write_bytecode = False):
7 import importlib.machinery
8 old_val = sys.dont_write_bytecode
9 sys.dont_write_bytecode = not write_bytecode
10 module = importlib.machinery.SourceFileLoader(name, path).load_module()
11 sys.dont_write_bytecode = old_val
14 def make_zone(filename: str) -> None:
15 zonefile = load_module(os.path.basename(filename), filename)
16 zone = zonefile.__zone__ # type: Zone
19 if __name__ == "__main__":
20 for name in sys.argv[1:]: