
What's the use of if __name__ == '__main__': in Python? - quickthrower2
https://dev.to/wangonya/what-s-the-use-of-if-name-main-in-python-3eo5
======
thwythwy
Does not run the entirety of the script UNLESS it's the main program.

So if you're using the script as part of something else, it isn't main. It
won't run. It'll instead be run through another script that references it.

