def load(fn, parent_pymod, yang_module, path_helper=None, extmethods=None, overwrite=False): try: f = json.load(open(fn, 'r')) except IOError, m: raise pybindJSONIOError("could not open file to read")
def dump(obj, fn, indent=4, filter=True, skip_subtrees=[]): try: fh = open(fn, 'w') except IOError, m: raise pybindJSONIOError("could not open file for writing: %s" % m)