X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fdialcentral.py;h=86a0db148302464816df2927982aa5a547f2fe59;hb=e5a696cb320685490e5583bba6c95cd82af916fc;hp=bfc0f26d7d5f3ee0ff147a47d528c1b711c72e59;hpb=29ad538975c66003faf20cbf15fd8dce0a96ea0c;p=gc-dialer diff --git a/src/dialcentral.py b/src/dialcentral.py index bfc0f26..86a0db1 100755 --- a/src/dialcentral.py +++ b/src/dialcentral.py @@ -1,31 +1,22 @@ -#!/usr/bin/python +#!/usr/bin/env python +# -*- coding: utf-8 -*- -import os -import sys -import logging +""" +Copyright (C) 2007 Christoph Würstle +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. +""" -_moduleLogger = logging.getLogger("dialcentral") -sys.path.insert(0,"/usr/lib/dialcentral/") +import sys -import constants -import dc_glade +sys.path.append("/opt/dialcentral/lib") -try: - os.makedirs(constants._data_path_) -except OSError, e: - if e.errno != 17: - raise +import dialcentral_qt -logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_) -_moduleLogger.info("Dialcentral %s-%s" % (constants.__version__, constants.__build__)) -_moduleLogger.info("OS: %s" % (os.uname()[0], )) -_moduleLogger.info("Kernel: %s (%s) for %s" % os.uname()[2:]) -_moduleLogger.info("Hostname: %s" % os.uname()[1]) -try: - dc_glade.run_dialpad() -finally: - logging.shutdown() +if __name__ == "__main__": + dialcentral_qt.run()