Subversion Repositories SmartDukaan

Rev

Rev 14145 | Rev 14154 | 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
8
config = ConfigParser.RawConfigParser()
9
config.read('ConfigFile.properties')
10
 
14145 amit.gupta 11
def getConfig(propertyName):
14152 amit.gupta 12
    global config
13
    value = config.get('PROD', propertyName)
14141 amit.gupta 14
    if value is None:
14145 amit.gupta 15
        return config.get('DEFAULT', propertyName)
14141 amit.gupta 16
    return value
17
 
18
def main():
14145 amit.gupta 19
    print getConfig('WALLET_CREDIT_URL')
14141 amit.gupta 20
 
21
if __name__ == '__main__':
22
    main()