src/aoikhotkey/__main__.py
def main(args=None):
    """
    Main function that is the program entry point.

    This function does three things:

    - Prepares `sys.path` so that program users do not need set up PYTHONPATH.

    - Checks whether dependency packages have been installed.

    - Delegates call to :paramref:`aoikhotkey.mediator.main_wrap`.

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

    :return: Exit code.
    """
    # Prepare `sys.path` for import resolution
    syspath_init()

    # Print title
    print('----- sys.path -----')

    # Print paths in `sys.path`
    print('\n'.join(sys.path))

    # Print title
    print('===== sys.path =====')

    # Check whether dependency packages are installed
    error_msg = check_deps()

    # If have error message for missing dependency
    if error_msg is not None:
        # Print error message
        sys.stderr.write(error_msg)

        # Return exit code
        return 8

    # If not have error message for missing dependency.

    # Import `main_wrap` function
    from aoikhotkey.mediator import main_wrap

    # Delegate call to `main_wrap` function
    return main_wrap(args=args)

    Main function that is the program entry point.

    This function does three things:

    - Prepares `sys.path` so that program users do not need set up PYTHONPATH.

    - Checks whether dependency packages have been installed.

    - Delegates call to :paramref:`aoikhotkey.mediator.main_wrap`.

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

    :return: Exit code.
    
Main function that is the program entry point.
This function does three things.

Prepares `sys.path` so that program users do not need set up PYTHONPATH.

Checks whether dependency packages have been installed.


Main function that is the program entry point . This function does three things . Prepares ` sys . path ` so that program users do not need set up PYTHONPATH . Checks whether dependency packages have been installed .
def main(args=None):
    syspath_init()
    print('----- sys.path -----')
    print('\n'.join(sys.path))
    print('===== sys.path =====')
    error_msg = check_deps()
    if error_msg is not None:
        sys.stderr.write(error_msg)
        return 8
    from aoikhotkey.mediator import main_wrap
    return main_wrap(args=args)
def main ( args = None ) : syspath_init ( ) print ( '----- sys.path -----' ) print ( '\n' . join ( sys . path ) ) print ( '===== sys.path =====' ) error_msg = check_deps ( ) if error_msg is not None : sys . stderr . write ( error_msg ) return 8 from aoikhotkey . mediator import main_wrap return main_wrap ( args = args )
Main function that is the program entry point.
Main function that is the program entry point .
"""
    Main function that is the program entry point.

    This function does three things:

    - Prepares `sys.path` so that program users do not need set up PYTHONPATH.

    - Checks whether dependency packages have been installed.

    - Delegates call to :paramref:`aoikhotkey.mediator.main_wrap`.

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

    :return: Exit code.
    """ # Prepare `sys.path` for import resolution # Print title # Print paths in `sys.path` # Print title # Check whether dependency packages are installed # If have error message for missing dependency # Print error message # Return exit code # If not have error message for missing dependency. # Import `main_wrap` function # Delegate call to `main_wrap` function
None
args
Argument list. Default is use `sys.argv[1:]`.
Argument list . Default is use ` sys . argv [ 1 : ] ` .