forked from dougle/Cender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (26 loc) · 867 Bytes
/
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
#!/usr/bin/python
import sys
import logging
import os.path
from PyQt4 import QtCore, QtGui, uic
from configuration import conf
from main_window import MainWindow
def main():
app_name = 'Cender'
log_filename = app_name.lower() + '.log'
logging.basicConfig(filename=log_filename, level=logging.DEBUG)
logger = logging.getLogger(app_name.lower())
logger.debug('Logging initialised')
app = QtGui.QApplication(sys.argv)
logger.debug('Application initialised')
conf.set('ui.app.author', "Dougle")
main_window = MainWindow()
sys.exit(app.exec_())
def trace(frame, event, arg):
with open('trace.log', 'a') as trace_file:
trace_file.write("%s, %s:%d\n" %
(event, frame.f_code.co_filename, frame.f_lineno))
return trace
if __name__ == '__main__':
# sys.settrace(trace)
main()