3 # Rec10 TS Recording Tools
\r
4 # Copyright (C) 2009-2011 Yukikaze
\r
8 mypath = str(os.path.dirname(os.path.abspath(__file__)))
\r
9 confp = ConfigParser.SafeConfigParser()
\r
12 if os.path.exists(os.path.join(mypath,Conf)):
\r
13 confpath=os.path.join(mypath,Conf)
\r
14 elif os.path.exists(os.path.join("/etc","rec10.conf")):
\r
15 confpath=os.path.join("/etc","rec10.conf")
\r
16 elif os.path.exists(os.path.join("/etc/rec10","rec10.conf")):
\r
17 confpath=os.path.join("/etc/rec10","rec10.conf")
\r
18 confp.read(confpath)
\r
19 def getConfPath(string):
\r
21 return confp.get('path', string)
\r
22 def getConfDB(string):
\r
24 return confp.get('db', string)
\r
25 def getConfEnv(string):
\r
27 return confp.get('env', string)
\r
28 def getConfLog(string):
\r
30 return confp.get('log', string)
\r
31 def getConfDVB(string):
\r
33 return confp.get('dvb',string)
\r