Exemplo n.º 1
0
                        winsound.PlaySound(action, winsound.SND_FILENAME)

                    #현재 프로그램 기능으로 사용할 항목
                    elif ACTION_TYPE[typeForAction] == "SPECIAL":
                        if key == "15336":
                            doloop = False
                            raise KeyboardInterrupt
                    else:
                        pass

                except KeyError as e:
                    if DEBUG is True:
                        print("key[{}] is not in settings.ini".format(key))
                        print(e)

                except ValueError as e:
                    if DEBUG is True:
                        print(e)

                except OSError as e:
                    if DEBUG is True:
                        print(e)

        except KeyboardInterrupt as e:
            if DEBUG is True:
                print("user keyInterrupt")
                print(e)
            doloop = False

    lp.disconnect()
    sys.exit()