def main_CLI(args): Output.verbose("*" * 10 + " " + str(datetime.datetime.now()) + " " + "*" * 10) Output.verbose("ENACdrives " + CONST.FULL_VERSION) Output.verbose("Detected OS : " + CONST.OS_DISTRIB + " " + CONST.OS_SYS + " " + CONST.OS_VERSION + "\n") Output.debug("LOCAL_USERNAME:"******"LOCAL_GROUPNAME:" + CONST.LOCAL_GROUPNAME) Output.debug("LOCAL_UID:" + str(CONST.LOCAL_UID)) Output.debug("LOCAL_GID:" + str(CONST.LOCAL_GID)) Output.debug("HOME_DIR:" + CONST.HOME_DIR) Output.debug("USER_CONF_FILE:" + CONST.USER_CONF_FILE) Output.debug("RESOURCES_DIR:" + CONST.RESOURCES_DIR + "\n") Output.debug("IMAGES_DIR:" + CONST.IMAGES_DIR + "\n") Output.debug("DEFAULT_MNT_DIR:" + CONST.DEFAULT_MNT_DIR + "\n") release_number_validation = validate_release_number() if release_number_validation == 'too old': Output.warning(CONST.NEED_TO_UPDATE_MSG) elif release_number_validation == 'newer': Output.normal(CONST.NEWER_THAN_PROD_MSG) if args.version: Output.cli("ENACdrives " + CONST.FULL_VERSION) sys.exit(0) ui = CLI(args) sys.exit(ui.run())
def main(): with Output(): cfg = get_config() Output.debug(pprint.pformat(cfg))
def main_GUI(): Output.verbose("*" * 10 + " " + str(datetime.datetime.now()) + " " + "*" * 10) Output.verbose("ENACdrives " + CONST.FULL_VERSION) Output.verbose("Detected OS : " + CONST.OS_DISTRIB + " " + CONST.OS_SYS + " " + CONST.OS_VERSION) Output.debug("LOCAL_USERNAME:"******"LOCAL_GROUPNAME:" + CONST.LOCAL_GROUPNAME) Output.debug("LOCAL_UID:" + str(CONST.LOCAL_UID)) Output.debug("LOCAL_GID:" + str(CONST.LOCAL_GID)) Output.debug("HOME_DIR:" + CONST.HOME_DIR) Output.debug("USER_CONF_FILE:" + CONST.USER_CONF_FILE) Output.debug("RESOURCES_DIR:" + CONST.RESOURCES_DIR) Output.debug("IMAGES_DIR:" + CONST.IMAGES_DIR + "\n") Output.debug("DEFAULT_MNT_DIR:" + CONST.DEFAULT_MNT_DIR + "\n") Output.br() app = QtWidgets.QApplication(sys.argv) ui = GUI() sys.exit(app.exec_())