level=logging.DEBUG, format="%(asctime)s : %(levelname)s : %(message)s", filename=os.path.join(logs_folder, 'PatchIt.log'), # "a" so the Logs is appended to and not overwritten # and is created if it does not exist filemode="a" ) # -- End Logging Configuration -- # except PermissionError: # lint:ok # User did not want to reload with Administrator rights if not runasadmin.AdminRun().launch( "PatchIt! does not have the user rights to operate!"): # Close PatchIt! raise SystemExit(0) # ------------ End PatchIt! Logging Code ------------ # if __name__ == "__main__": # Run PatchIt! Initialization appLoggingFolder() # Write window title (since there is no GUI in PatchIt! itself (yet)) os.system("title {0} {1} {2}".format( const.app, const.majver, const.minver)) PatchIt.info() PatchIt.args() PatchIt.preload()