'Save config into the associated .ini file'

def _save(self):

    if TEST:
        return
    fname = self.filename()
    def _write_file(fname):
        if PY2:
            with codecs.open(fname, 'w', encoding='utf-8') as configfile:
                self._write(configfile)
        else:
            with open(fname, 'w', encoding='utf-8') as configfile:
                self.write(configfile)
    try:
        _write_file(fname)
    except IOError:
        try:
            if osp.isfile(fname):
                os.remove(fname)
            time.sleep(0.05)
            _write_file(fname)
        except Exception as e:
            print('Failed    to    write    user    configuration    file.')
            print('Please    submit    a    bug    report.')
            raise e
