Starting on removing LDS Church affiliations
[watersofshiloah] / src / WatersOfShiloah.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import os
5 import sys
6 import logging
7
8 _moduleLogger = logging.getLogger(__name__)
9 sys.path.append('../lib')
10
11
12 import constants
13 import watersofshiloah_gtk
14
15
16 if __name__ == "__main__":
17         try:
18                 os.makedirs(constants._data_path_)
19         except OSError, e:
20                 if e.errno != 17:
21                         raise
22
23         try:
24                 os.makedirs(constants._cache_path_)
25         except OSError, e:
26                 if e.errno != 17:
27                         raise
28
29         logFormat = '(%(asctime)s) %(levelname)-5s %(threadName)s.%(name)s: %(message)s'
30         logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_, format=logFormat)
31         _moduleLogger.info("%s %s-%s" % (constants.__app_name__, constants.__version__, constants.__build__))
32         _moduleLogger.info("OS: %s" % (os.uname()[0], ))
33         _moduleLogger.info("Kernel: %s (%s) for %s" % os.uname()[2:])
34         _moduleLogger.info("Hostname: %s" % os.uname()[1])
35
36         watersofshiloah_gtk.run()