StrictThemes

Set / Get a tag from a configuration file

import ConfigParser def getTag(file,section,property): config = ConfigParser.ConfigParser() config.read(file) return config.get(section,property) def setTag(file,section,property,newValue): config = ConfigParser.ConfigParser() config.read(file) cfgfile = open(file,'w') config.set(section,property,newValue) config.write(cfgfile) cfgfile.close()
Set and Get a tag from a .ini file module

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.