import config def log(text): if config.verbose == True: print(text) with open(config.logfile, "a") as logfile: logfile.write(f"{text}\n")