-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
51 lines (39 loc) · 1.22 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import sys
import logging
from PySide.QtCore import *
from PySide.QtGui import *
import MainWin
import cpyprot
PROVIDED_TO = "WAYNE EVANS"
lg = logging.getLogger('autoaudit')
ft = logging.Formatter(fmt="[%(filename)10s:%(lineno)4s - %(funcName)15s()] %(message)s")
fh = logging.FileHandler('session.log')
ch = logging.StreamHandler()
lg.setLevel(logging.DEBUG)
fh.setFormatter(ft)
ch.setFormatter(ft)
lg.addHandler(fh)
lg.addHandler(ch)
if __name__ == '__main__':
lg.debug('Application starting')
if cpyprot.versionHasExpired():
lg.debug('This software has expired, and will be destroyed.')
cpyprot.haraKiri()
sys.exit(2)
# cleanlooks is way hot style
QApplication.setStyle('cleanlooks')
# DEBUG for use in ipython
# app = QCoreApplication.instance()
app = QApplication(sys.argv)
# change colours if you want
# pal = app.palette()
# pal.setColor(QPalette.Base, Qt.black)
# pal.setColor(QPalette.Text, Qt.white)
# pal.setColor(QPalette.Highlight, Qt.blue)
# app.setPalette(pal)
lg.debug('Starting MainWindow')
mw = MainWin.MainWin(PROVIDED_TO)
mw.show()
res = app.exec_()
lg.debug('Exiting... Application returned %s', res)
sys.exit(res)