Rev 14155 | Blame | Compare with Previous | Last modification | View Log | RSS feed
'''Created on Feb 25, 2015@author: amit'''#!/usr/bin/pythonimport ConfigParserimport osconfig = ConfigParser.RawConfigParser()__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))config.read(os.path.join(__location__, 'ConfigFile.properties'))try:ENV = os.environ["ENV"]if not ENV:ENV = "LOCAL"except:ENV = "DEFAULT"def getConfig(propertyName):global configvalue = config.get(ENV, propertyName)if value is None:return config.get('DEFAULT', propertyName)return valuedef main():print getConfig('WALLET_CREDIT_URL')if __name__ == '__main__':main()