]> Softwares of Agnibho - medscript.git/blob - medscript.py
Bugfix: Windows uninstall package permission error
[medscript.git] / medscript.py
1 # MedScript
2 # Copyright (C) 2023 Dr. Agnibho Mondal
3 # This file is part of MedScript.
4 # MedScript 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.
5 # MedScript 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.
6 # You should have received a copy of the GNU General Public License along with MedScript. If not, see <https://www.gnu.org/licenses/>.
7
8 import logging, sys, os
9 from logging.handlers import RotatingFileHandler
10 from PyQt6.QtWidgets import QApplication
11 from window import MainWindow
12 from config import config
13
14 if __name__=="__main__":
15 logging.basicConfig(level=logging.INFO,
16 format="[%(asctime)s] (%(module)s / %(funcName)s) %(levelname)s : %(message)s",
17 handlers=[RotatingFileHandler(os.path.join(config["log_directory"], "log.txt"), maxBytes=100000, backupCount=9), logging.StreamHandler()],
18 force=True
19 )
20 app=QApplication(sys.argv)
21 with open(os.path.join(config["resource"], "style.qss")) as qss:
22 app.setStyleSheet(qss.read())
23 window=MainWindow()
24 sys.exit(app.exec())