libaaron/libaaron.py
def quietinterrupt(msg=None):
    """add a handler for SIGINT that optionally prints a given message.
    For stopping scripts without having to see the stacktrace.
    """

    def handler():
        if msg:
            print(msg, file=sys.stderr)
        sys.exit(1)

    signal.signal(signal.SIGINT, handler)
def quietinterrupt(msg=None):
    def handler():
        if msg:
            print(msg, file=sys.stderr)
        sys.exit(1)

    signal.signal(signal.SIGINT, handler)
def quietinterrupt ( msg = None ) : def handler ( ) : if msg : print ( msg , file = sys . stderr ) sys . exit ( 1 ) signal . signal ( signal . SIGINT , handler )
add a handler for SIGINT that optionally prints a given message.
    For stopping scripts without having to see the stacktrace.
add a handler for SIGINT that optionally prints a given message . For stopping scripts without having to see the stacktrace .