import gds import sys for arg in sys.argv[1:]: f = open(arg, "rb") try: lib = gds.parse_file(f) print("file version: {}".format(lib.version)) print("last access: {}".format(lib.last_access.isoformat())) print("last modification: {}".format(lib.last_mod.isoformat())) print("m/unit : {}".format(lib.meters_per_unit)) print("unit/dbunit : {}".format(lib.units_per_dbunit)) print("library name : {}".format(lib.name)) print("contains a total of {} structure(s)".format(len(lib.structures))) except gds.ParserError as e: print("parser error: {}".format(e)) finally: f.close()