def write(): global dirty if not dirty: return try: fd = open( ini_filename, "w", encoding="utf-8" ) msvcrt.locking( fd.fileno(), msvcrt.LK_LOCK, 1 ) ini.write(fd) fd.close() dirty = False except: clnch_debug.printErrorInfo()
def write(): global dirty if not dirty: return try: fd = open(ini_filename, "w", encoding="utf-8") msvcrt.locking(fd.fileno(), msvcrt.LK_LOCK, 1) ini.write(fd) fd.close() dirty = False except: clnch_debug.printErrorInfo()
def read(): global ini global dirty ini = configparser.RawConfigParser() try: fd = open( ini_filename, "r", encoding="utf-8" ) msvcrt.locking( fd.fileno(), msvcrt.LK_LOCK, 1 ) ini.readfp(fd) fd.close() except: clnch_debug.printErrorInfo() dirty = False
def read(): global ini global dirty ini = configparser.RawConfigParser() try: fd = open(ini_filename, "r", encoding="utf-8") msvcrt.locking(fd.fileno(), msvcrt.LK_LOCK, 1) ini.readfp(fd) fd.close() except: clnch_debug.printErrorInfo() dirty = False