From e7a2f7f30c76c7e4a5fa3435dcd01e48acb1b9dc Mon Sep 17 00:00:00 2001 From: scorrea Date: Thu, 30 Apr 2020 14:25:53 +0200 Subject: [PATCH] deleted files Please enter the commit message for your changes. Lines starting --- xml_json.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 xml_json.py diff --git a/xml_json.py b/xml_json.py deleted file mode 100644 index dac1c8d1..00000000 --- a/xml_json.py +++ /dev/null @@ -1,17 +0,0 @@ -import xmltodict -import json -from pathlib import Path - - - - -basepath= Path('DRAMSys/library/resources/configs/mcconfigs') -for path in basepath.iterdir(): - if path.is_file(): - filename=str(path) - if filename.endswith('.xml'): - # if os.stat(path).st_size != 0: #check if it is empty - with open(path, "r") as in_file: - xml = in_file.read() - with open(filename.replace(".xml",".json"), 'w') as out_file: - json.dump(xmltodict.parse(xml), out_file) \ No newline at end of file