Esempio n. 1
0
def init():
    import sys
    import traceback
    from app import helpers
    from app import models
    sys.excepthook = traceback.print_exception
    helpers.init_logging()
    helpers.init_data_dir()
    models.init_profile_db()
    models.init_data_db()
"""
Service launcher to use Flask without wsgi.py
"""
from app import app  # pylint: disable=unused-import
from app.helpers import init_logging

#initialize logging using JSON as a format.
init_logging()
Esempio n. 3
0
import traceback
import locale
import logging
from PyQt5 import QtWidgets, QtGui
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QIcon

import app
from app import helpers
from app.node import Node
from app.updater import Updater
from app.widgets.proto import MainWindow
from app.widgets.setup_wizard import SetupWizard
from app.signals import signals

helpers.init_logging()
log = logging.getLogger(__name__)


class Application(QtWidgets.QApplication):
    def __init__(self, args, main_widget=None):
        log.debug('init app')
        super().__init__(args)

        if not app.is_frozen():
            sys.excepthook = traceback.print_exception

        self.setQuitOnLastWindowClosed(False)

        # Initialize application metadata
        locale.setlocale(locale.LC_ALL, '')