Updating based on work with MormonChannel
[gc-dialer] / src / REPLACEME.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 """
5 Copyright (C) 2007 Christoph Würstle
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
9 """
10
11 import os
12 import sys
13 import logging
14
15 _moduleLogger = logging.getLogger(__name__)
16 sys.path.append('../lib')
17
18
19 import constants
20 import REPLACEME_gtk
21
22
23 if __name__ == "__main__":
24         try:
25                 os.makedirs(constants._data_path_)
26         except OSError, e:
27                 if e.errno != 17:
28                         raise
29
30         try:
31                 os.makedirs(constants._cache_path_)
32         except OSError, e:
33                 if e.errno != 17:
34                         raise
35
36         logFormat = '(%(asctime)s) %(levelname)-5s %(threadName)s.%(name)s: %(message)s'
37         logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_, format=logFormat)
38         _moduleLogger.info("%s %s-%s" % (constants.__app_name__, constants.__version__, constants.__build__))
39         _moduleLogger.info("OS: %s" % (os.uname()[0], ))
40         _moduleLogger.info("Kernel: %s (%s) for %s" % os.uname()[2:])
41         _moduleLogger.info("Hostname: %s" % os.uname()[1])
42
43         REPLACEME_gtk.run()