Subversion Repositories SmartDukaan

Rev

Rev 14152 | Rev 14155 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

'''
Created on Feb 25, 2015

@author: amit
'''
#!/usr/bin/python    
import ConfigParser
import os
config = ConfigParser.RawConfigParser()
config.read('./ConfigFile.properties')
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
config.read(os.path.join(__location__, 'ConfigFile.properties'))

def getConfig(propertyName):
    global config
    value = config.get('PROD', propertyName)
    if value is None:
        return config.get('DEFAULT', propertyName)
    return value

def main():
    print getConfig('WALLET_CREDIT_URL')

if __name__ == '__main__':
    main()