forked from video-annotator/pythonvideoannotator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__main__.py
More file actions
executable file
·44 lines (31 loc) · 1.22 KB
/
Copy path__main__.py
File metadata and controls
executable file
·44 lines (31 loc) · 1.22 KB
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
# !/usr/bin/python2
# -*- coding: utf-8 -*-
import logging
import loggingbootstrap
try:
import pyforms
except ImportError as err:
logging.getLogger().critical(str(err), exc_info=True)
exit("Could not load pyforms! Is it installed?")
try:
from pysettings import conf
# Initiating logging for pysettings. It has to be initiated manually here because we don't know yet
# the logger filename as specified on settings
loggingbootstrap.create_double_logger("pysettings", logging.DEBUG, 'pythonvideoannotator.log', logging.DEBUG)
except ImportError as err:
logging.getLogger().critical(str(err), exc_info=True)
exit("Could not load pysettings! Is it installed?")
from pythonvideoannotator.base_module import BaseModule
print()
print('**************************************')
print()
VideoAnnotator = type(
'VideoAnnotator',
tuple(conf.MODULES.find_class('module.Module') + [BaseModule]),
{}
)
# setup different loggers but output to single file
loggingbootstrap.create_double_logger("pythonvideoannotator", conf.APP_LOG_HANDLER_CONSOLE_LEVEL, conf.APP_LOG_FILENAME,
conf.APP_LOG_HANDLER_FILE_LEVEL)
def start(): pyforms.start_app(VideoAnnotator, geometry=conf.MAIN_WINDOW_GEOMETRY)
if __name__ == '__main__': start()