2005-04-15 19:02:23 +02:00
|
|
|
## common/gajim.py
|
|
|
|
##
|
|
|
|
## Gajim Team:
|
2005-06-06 01:42:30 +02:00
|
|
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
|
|
|
## - Vincent Hanquez <tab@snarc.org>
|
2005-04-18 16:05:30 +02:00
|
|
|
## - Nikos Kouremenos <kourem@gmail.com>
|
2005-04-15 19:02:23 +02:00
|
|
|
##
|
|
|
|
## Copyright (C) 2003-2005 Gajim Team
|
|
|
|
##
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published
|
|
|
|
## by the Free Software Foundation; version 2 only.
|
|
|
|
##
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
|
2005-06-25 03:23:21 +02:00
|
|
|
import os
|
2005-04-15 19:02:23 +02:00
|
|
|
import logging
|
|
|
|
import common.config
|
2005-04-16 00:02:13 +02:00
|
|
|
import common.logger
|
2005-04-15 19:02:23 +02:00
|
|
|
|
2005-06-19 15:17:32 +02:00
|
|
|
version = '0.8'
|
2005-04-15 19:02:23 +02:00
|
|
|
config = common.config.Config()
|
|
|
|
connections = {}
|
2005-05-29 21:04:01 +02:00
|
|
|
verbose = False
|
2005-05-17 22:31:43 +02:00
|
|
|
|
|
|
|
h = logging.StreamHandler()
|
|
|
|
f = logging.Formatter('%(asctime)s %(name)s: %(message)s', '%d %b %Y %H:%M:%S')
|
|
|
|
h.setFormatter(f)
|
2005-04-15 19:02:23 +02:00
|
|
|
log = logging.getLogger('Gajim')
|
2005-05-17 22:31:43 +02:00
|
|
|
log.addHandler(h)
|
|
|
|
|
2005-04-16 00:02:13 +02:00
|
|
|
logger = common.logger.Logger()
|
2005-05-17 19:37:50 +02:00
|
|
|
DATA_DIR = '../data'
|
2005-06-25 11:35:31 +02:00
|
|
|
LANG = os.getenv('LANG') # en_US, fr_FR, el_GR etc..
|
2005-06-25 09:37:14 +02:00
|
|
|
if LANG:
|
2005-06-25 11:35:31 +02:00
|
|
|
LANG = LANG[:2] # en, fr, el etc..
|
2005-06-25 09:37:14 +02:00
|
|
|
else:
|
|
|
|
LANG = 'en'
|