comparison main.py @ 167:b3b82c2aebee

Using fife settings module again instead of our own.
author Beliar <KarstenBock@gmx.net>
date Mon, 20 Feb 2012 16:50:10 +0100
parents 86656563555e
children 5d47ad053aef
comparison
equal deleted inserted replaced
166:a6bbb732b27b 167:b3b82c2aebee
13 # along with this program. If not, see <http://www.gnu.org/licenses/>. 13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 import logging 14 import logging
15 import sys 15 import sys
16 from os.path import abspath 16 from os.path import abspath
17 17
18 from parpg.settings import Settings 18 from fife.extensions.fife_settings import Setting
19 19
20 20
21 def main(args, opts): 21 def main(args, opts):
22 settings = Settings(*args) 22 settings = Setting(settings_file="settings.xml")
23 23
24 settings.parpg.DataPath = abspath(settings.parpg.DataPath) 24 settings.set("parpg","DataPath", abspath(settings.get("parpg","DataPath")))
25 25
26 levels = {'debug': logging.DEBUG, 26 levels = {'debug': logging.DEBUG,
27 'info': logging.INFO, 27 'info': logging.INFO,
28 'warning': logging.WARNING, 28 'warning': logging.WARNING,
29 'error': logging.ERROR, 29 'error': logging.ERROR,
55 psyco_available = True 55 psyco_available = True
56 except ImportError: 56 except ImportError:
57 logger.warning('Psyco Acceleration unavailable') 57 logger.warning('Psyco Acceleration unavailable')
58 psyco_available = False 58 psyco_available = False
59 59
60 if settings.fife.UsePsyco: 60 if settings.get("fife", "UsePsyco"):
61 if psyco_available: 61 if psyco_available:
62 psyco.full() 62 psyco.full()
63 logger.info('Psyco Acceleration enabled') 63 logger.info('Psyco Acceleration enabled')
64 else: 64 else:
65 logger.warning('Please install psyco before attempting to use it' 65 logger.warning('Please install psyco before attempting to use it'