src/aoikhotkey/mediator.py
def main_wrap(args=None):
    """
    Main function's wrapper function.

    :param args: Argument list. Default is use `sys.argv[1:]`.

    :return: Exit code.
    """
    try:
        # Delegate call to `main_inner`
        return main_inner(args)

    # If have `SystemExit`
    except SystemExit:
        # Raise as-is
        raise

    # If have `KeyboardInterrupt`
    except KeyboardInterrupt:
        # Return exit code
        return MAIN_RET_V_OK

    # If have other exceptions
    except BaseException:
        # Get traceback message
        tb_msg = format_exc()

        # Print traceback message
        sys.stderr.write('# Caught exception\n---\n{0}---\n'.format(tb_msg))

        # Return exit code
        return MAIN_RET_V_EXC_LEAK_ERR

    Main function's wrapper function.

    :param args: Argument list. Default is use `sys.argv[1:]`.

    :return: Exit code.
    
Main function's wrapper function.
Main function ' s wrapper function .
def main_wrap(args=None):
    try:
        return main_inner(args)
    except SystemExit:
        raise
    except KeyboardInterrupt:
        return MAIN_RET_V_OK
    except BaseException:
        tb_msg = format_exc()
        sys.stderr.write('# Caught exception\n---\n{0}---\n'.format(tb_msg))
        return MAIN_RET_V_EXC_LEAK_ERR
def main_wrap ( args = None ) : try : return main_inner ( args ) except SystemExit : raise except KeyboardInterrupt : return MAIN_RET_V_OK except BaseException : tb_msg = format_exc ( ) sys . stderr . write ( '# Caught exception\n---\n{0}---\n' . format ( tb_msg ) ) return MAIN_RET_V_EXC_LEAK_ERR
Main function's wrapper function.
Main function ' s wrapper function .
"""
    Main function's wrapper function.

    :param args: Argument list. Default is use `sys.argv[1:]`.

    :return: Exit code.
    """ # Delegate call to `main_inner` # If have `SystemExit` # Raise as-is # If have `KeyboardInterrupt` # Return exit code # If have other exceptions # Get traceback message # Print traceback message # Return exit code
None
args
Argument list. Default is use `sys.argv[1:]`.
Argument list . Default is use ` sys . argv [ 1 : ] ` .