import zipfile
import os, json

def compressFiles(filepaths=[], output="./lfiles_compressed.zip"):
    try:
        zfile = zipfile.ZipFile(output, 'w')
        for filepath in filepaths:
            print("Begin compressing file: {0}".format(filepath))
            zfile.write(filename=filepath, compress_type = zipfile.ZIP_DEFLATED)
        zfile.close()
        print("All file processed!")
        pass
    except Exception as e:
        print(e)
        pass

# {
#   "keyname":[1,2,3], 
#   "key2": [1,2,3]
# }
def readConfig(param, file="./config.file"):
    try:
        with open(file, "r+") as fh:
            content = fh.read()
            print(content)
    except Exception as e:
        raise(e)
        pass

def writeConfig(param, file="./config.file"):
    try:
        pass
    except Exception as e:
        pass

if __name__ == "__main__":
    # compressFiles(filepaths=["./log.txt"])
    readConfig("key1")