X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=blobdiff_plain;f=rec10%2Ftrunk%2Fsrc%2Fconfigwriter.py;h=f7c88b647c1d9b03d974f70612d1c3da5a2b6160;hp=c755ba09368ed30b71ce49fb38f85cff45bd672b;hb=d381e264288091d06b29551d62fdc46b9629dbd5;hpb=7160b23094399ee7fdc186331aa3096c353447c3 diff --git a/rec10/trunk/src/configwriter.py b/rec10/trunk/src/configwriter.py index c755ba0..f7c88b6 100644 --- a/rec10/trunk/src/configwriter.py +++ b/rec10/trunk/src/configwriter.py @@ -1,35 +1,32 @@ -#!/usr/bin/python -# coding: UTF-8 -# Rec10 TS Recording Tools -# Copyright (C) 2009-2010 Yukikaze -import ConfigParser -import os -import os.path -mypath = str(os.path.dirname(os.path.abspath(__file__))) -confp = ConfigParser.SafeConfigParser() -Conf = 'rec10.conf' -confpath=os.path.join(mypath,Conf) -confp.read(confpath) -def getPathSetting(string): - global confp - return confp.get('path', string) -def getDBPathSetting(string): - global confp - return confp.get('db', string) -def getEnvSetting(string): - global confp - return confp.get('env', string) -def setPath(option,value): - global confp - return confp.set('path',option,value) -def setDBPath(option,value): - global confp - return confp.set('db',option,value) -def setEnv(option,value): - global confp - return confp.set('env',option,value) -def writeConf(): - global confp - f=open(confpath,"w") - confp.write(f) - f.close +#!/usr/bin/python +# coding: UTF-8 +# Rec10 TS Recording Tools +# Copyright (C) 2009-2011 Yukikaze +import ConfigParser +import os +import os.path +mypath = str(os.path.dirname(os.path.abspath(__file__))) +confp = ConfigParser.SafeConfigParser() +Conf = 'rec10.conf' +confpath=os.path.join(mypath,Conf) +confp.read(confpath) +def getTempConfPath(string): + global confp + return confp.get('path', string) +def setTempConfPath(option,value): + global confp + return confp.set('path',option,value) +def setTempConfDB(option,value): + global confp + return confp.set('db',option,value) +def setTempConfEnv(option,value): + global confp + return confp.set('env',option,value) +def setTempConfDVB(option,value): + global confp + return confp.set('dvb',option,value) +def writeTempConf(): + global confp + f=open(confpath,"w") + confp.write(f) + f.close