Skip to main content

prettier test for main

Project description

A prettier way to test for main.

is_main()

Instead of the not-so-pretty:

if __name__ == "__main__":
    main()

pip install ismain from PyPI:

$pip install ismain

And use is_main() from ismain:

from ismain import is_main

if is_main():
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ismain, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size ismain-0.0.4-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page