Subversion Repositories SmartDukaan

Rev

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
14154 amit.gupta 8
import os
14141 amit.gupta 9
config = ConfigParser.RawConfigParser()
14154 amit.gupta 10
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
11
config.read(os.path.join(__location__, 'ConfigFile.properties'))
14141 amit.gupta 12
 
14145 amit.gupta 13
def getConfig(propertyName):
14152 amit.gupta 14
    global config
14155 amit.gupta 15
    value = config.get('LOCAL', propertyName)
14141 amit.gupta 16
    if value is None:
14145 amit.gupta 17
        return config.get('DEFAULT', propertyName)
14141 amit.gupta 18
    return value
19
 
20
def main():
14145 amit.gupta 21
    print getConfig('WALLET_CREDIT_URL')
14141 amit.gupta 22
 
23
if __name__ == '__main__':
24
    main()