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 with the zones
17 if __name__ == "__main__":
18 for name in sys.argv[1:]: