#!/usr/bin/env python3 # pamhyr.py -- Pamhyr entrypoint # Copyright (C) 2023 INRAE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -*- coding: utf-8 -*- import sys, os import locale import logging from PyQt5.QtCore import QTranslator from PyQt5.QtWidgets import QApplication from config import Config from tools import ( reset_timers, display_timers, timer, logger_color_blue, logger_color_red, logger_color_green, logger_color_reset ) from View.MainWindow import ApplicationWindow from Model.Study import Study from Scripts.Hello import ScriptHello from init import license, setup_lang logger = logging.getLogger() scripts = { "gui" : None, "hello": ScriptHello, } def usage(argv): logger.error(f"{logger_color_red()}Invalid script name '{argv[1]}'{logger_color_reset()}") logger.info(f"Usage: {argv[0]}