frappy/bin/secop-gui
Enrico Faulhaber c0fd2e9907 Use mlzlog for better logging
Change-Id: Ic82ca0d7b43a906cb9c7d3f1350287e7082afc45
2017-05-16 18:17:43 +02:00

58 lines
1.6 KiB
Python
Executable File

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (c) 2015-2016 by the authors, see LICENSE
#
# 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 2 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, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Module authors:
# Alexander Lenz <alexander.lenz@frm2.tum.de>
#
# *****************************************************************************
import sys
from os import path
# Add import path for inplace usage
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
from secop.gui.mainwindow import MainWindow
import mlzlog
from PyQt4.QtGui import QApplication
def main(argv=None):
if argv is None:
argv = sys.argv
if '-d' in argv:
mlzlog.initLogging('gui', 'debug')
else:
mlzlog.initLogging('gui', 'info')
app = QApplication(argv)
win = MainWindow()
win.show()
return app.exec_()
if __name__ == '__main__':
sys.exit(main(sys.argv))