Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
14141 amit.gupta 1
'''
2
Created on Feb 25, 2015
3
 
4
@author: amit
5
'''
6
#!/usr/bin/python    
7
import ConfigParser
14154 amit.gupta 8
import os
14141 amit.gupta 9
config = ConfigParser.RawConfigParser()
14154 amit.gupta 10
config.read('./ConfigFile.properties')
11
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
12
config.read(os.path.join(__location__, 'ConfigFile.properties'))
14141 amit.gupta 13
 
14145 amit.gupta 14
def getConfig(propertyName):
14152 amit.gupta 15
    global config
16
    value = config.get('PROD', propertyName)
14141 amit.gupta 17
    if value is None:
14145 amit.gupta 18
        return config.get('DEFAULT', propertyName)
14141 amit.gupta 19
    return value
20
 
21
def main():
14145 amit.gupta 22
    print getConfig('WALLET_CREDIT_URL')
14141 amit.gupta 23
 
24
if __name__ == '__main__':
25
    main()