def saveINI(self): """Save the INI file""" self.log.info("Saving INI file") fle = open(utils.relativePath("vb2py.ini"), "w") try: fle.write(self.components.optionText.text) self.log.info("Succeeded!") finally: fle.close()
def __init__(self, logger, *args, **kw): """Load the options file""" model.CustomDialog.__init__(self, *args, **kw) self.log = logger self.log.info("Opening INI file") fle = open(utils.relativePath("vb2py.ini"), "r") try: text = fle.read() self.components.optionText.text = text finally: fle.close()
def save(self): """Store the options""" f = open(utils.relativePath("settings.ini"), "w") self._config.write(f) f.close()
def __init__(self, appname): """Initialize the parser""" config.VB2PYConfigObject.__init__(self, filename=utils.relativePath("settings.ini")) self.appname = appname