예제 #1
0
파일: clnch_ini.py 프로젝트: byplayer/clnch
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()
예제 #2
0
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()
예제 #3
0
파일: clnch_ini.py 프로젝트: byplayer/clnch
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
예제 #4
0
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