main.py 600 B

1234567891011121314151617181920212223242526272829303132
  1. from init_var import *
  2. import os
  3. import sys
  4. from logger import create_logger
  5. from PySide6.QtWidgets import QApplication
  6. # from appdirs import user_data_dir
  7. def main():
  8. app = QApplication(sys.argv)
  9. create_logger()
  10. load_variables()
  11. from module.WorkWithDB import init_db
  12. from module.CleanerImage import CleanerImage
  13. from window.MainWindow import MainWindow
  14. init_db()
  15. CleanerImage(os.environ.get('PHOTO_DIR')) \
  16. .clear()
  17. window = MainWindow()
  18. window.show()
  19. sys.exit(app.exec())
  20. if __name__ == "__main__":
  21. main()