def main(filepath=''):
    """Launch application.

    Parameters
    ==========

    filepath (string)
        the path to a file to be opened. May an empty string,
        though, in which case the application starts without a
        loaded file.
    """
    ### load function that runs the app
    logger.info("Loading application.")

    ### try loading function to run app

    try:
        from .mainloop import run_app

    ## catch unexpected exceptions so we can log them
    ## before reraising

    except Exception as err:

        logger.exception(
            "Unexpected exception while loading application. Reraising now."
        )

        raise err

    ### finally, run the application

    logger.info("Starting application session.")

    run_app(filepath)

    logger.info("Finished application session.")
Launch application.

    Parameters
    ==========

    filepath (string)
        the path to a file to be opened. May an empty string,
        though, in which case the application starts without a
        loaded file.
    
nodezator/__main__.py