OSDN Git Service

fix duplicate updating bug.
[rec10/rec10-git.git] / rec10 / trunk / src / configreader.py
1 #!/usr/bin/python
2 # coding: UTF-8
3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
5 import os
6 import ConfigParser
7
8 mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
9
10 confp=ConfigParser.SafeConfigParser()
11 Conf='config.ini'
12 confp.read(mypath+Conf)
13
14 def getpath(string):
15     global confp
16     return confp.get('path',string)
17 def getdbpath(string):
18     global confp
19     return confp.get('db',string)
20 def getenv(string):
21     global confp
22     return confp.get('env',string)