Nice little Python script I whipped up to poll Amazon Prime Now to get my Switch: https://gist.github.com/bryanhelmig/3225bf42e5d2b8fb0cb4b720...
I'm a bit confused by the use of the
if __name__ == "__main__":
construct in this script. My understanding of that construct was that it is true when Python is invoked directly on the containing file, and is false if the file is being invoked as a module loaded from something else.In your script, the parts that are outside the "if __name__" construct do not appear to be things that would be useful for something else to load as a module. So my question is why aren't they inside the "if __name__" construct?