예제 #1
0
파일: clock_in.py 프로젝트: t-lou/clock_in
def main():
    LogHandler.merge_session()
    LogHandler.backup()
    handler = LogHandler()
    try:
        while True:
            handler.update_session()
            LogHandler.sleep()
    except:
        handler.update_session()
        LogHandler.merge_session()
        handler.print_progress_today(force=True)
예제 #2
0
def close():
    thread_update.terminate()
    handler.update_session()
    LogHandler.merge_session()
    handler.print_progress_today(force=True)
    base_window.destroy()
예제 #3
0
import tkinter
import multiprocessing

from log_handler import LogHandler

LogHandler.merge_session()
LogHandler.backup()
handler = LogHandler()


def close():
    thread_update.terminate()
    handler.update_session()
    LogHandler.merge_session()
    handler.print_progress_today(force=True)
    base_window.destroy()


def func_update():
    while True:
        handler.update_session()
        handler.print_progress_today(force=False)
        LogHandler.sleep()


if __name__ == '__main__':
    base_window = tkinter.Tk()
    base_window.title('clock-in')

    thread_update = multiprocessing.Process(target=func_update)
    thread_update.start()