Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

prettier test for main

Project description

A prettier way to test for main.


Instead of the not-so-pretty:

if __name__ == "__main__":

pip install ismain from PyPI:

$pip install ismain

And use is_main() from ismain:

from ismain import is_main

if is_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.3
Filename, size File type Python version Upload date Hashes
Filename, size ismain-0.0.3-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page