# !/usr/bin/env python
# -*- coding:utf-8 -*-
"""
    @File   : 'config'
    @Author : 'jonah'
    @Date   : '2015-09-17 19:40'
    @About  : 'Load config parameters'
"""
import ConfigParser
import os

configParser = ConfigParser.ConfigParser()
file_path = os.path.split(os.path.realpath(__file__))[0]
config_file = file_path + '/project_config.conf'
configParser.read(config_file)

project_config = dict(configParser.items('app'))
server_config = dict(configParser.items('game_server'))

APP_ID = unicode(project_config['appid'])
APP_KEY = unicode(project_config['appkey'])
MASTER_KEY = unicode(project_config['masterkey'])
PORT = int(server_config['port'])


if __name__ == '__main__':
    print APP_ID
    print APP_KEY
    print MASTER_KEY
    print PORT
