executable-application

raw JSON →
0.3.0 verified Fri May 01 auth: no python

A minimal example of an executable Python application packaged with setuptools. Current version 0.3.0, released infrequently. Intended for demonstration and learning purposes, not for production use.

pip install executable-application
error ModuleNotFoundError: No module named 'executable-application'
cause Attempting to import the package using the hyphenated PyPI name instead of the underscore module name.
fix
Use 'import executable_application' (underscore) instead of 'executable-application'.
error ImportError: cannot import name 'main' from 'executable_application'
cause Older versions of the package (pre-0.3.0) may not have the main function exposed at the top level.
fix
Upgrade to version 0.3.0 or later: pip install --upgrade executable-application.
gotcha The package name on PyPI contains a hyphen (executable-application), but the Python import uses an underscore (executable_application). This is a common source of confusion.
fix Use 'executable_application' in import statements.
deprecated As of version 0.3.0, there is no official CLI entry point; the package only provides a main() function.
fix Call from Python code: from executable_application import main; main().

Run the application's main function directly.

from executable_application import main
if __name__ == '__main__':
    main()