Ejemplo n.º 1
0
def main():
    print(__name__)
    lx = ListCommand()
    lx.main(args=None)

    # Note: Need a TextIOWrapper since streams are essentially byte-based since Python 3
    # See also http://bugs.python.org/issue13518
    loggingIni = pkg_resources.resource_stream(data.__name__, "logging.ini")
    loggingIni = io.TextIOWrapper(loggingIni, encoding="utf-8")
    print("LOGGING ini file: {}".format(loggingIni))

    logging.config.fileConfig(loggingIni)

    # Create the application object
    app = QApplication(sys.argv)

    # Create the main window
    mainWindow = MainWindow(app)

    # Show and run the application
    mainWindow.show()
    app.exec()
Ejemplo n.º 2
0
def main():
    print(__name__)
    lx = ListCommand()
    lx.main(args=None)

    # Note: Need a TextIOWrapper since streams are essentially byte-based since Python 3
    # See also http://bugs.python.org/issue13518
    loggingIni = pkg_resources.resource_stream(data.__name__, 'logging.ini')
    loggingIni = io.TextIOWrapper(loggingIni, encoding='utf-8')
    print("LOGGING ini file: {}".format(loggingIni))

    logging.config.fileConfig(loggingIni)

    # Create the application object
    app = QApplication(sys.argv)

    # Create the main window
    mainWindow = MainWindow(app)

    # Show and run the application
    mainWindow.show()
    app.exec()