You should put this in all your Python scripts
Python s favorite unexplained incantation: def main if name main. In this video I explain why your Python scripts should use this idiom. It s not strictly necessary, but you will be a better Python coder if you follow established conventions that improve the readability of your code. mCoding with James Murphy Source code: StackOverflow on the topic: Python docs: SUPPORT ME Sign up on Patreon to get your donor role and early access to videos Feeling generous but don t have a Patreon Donate via PayPal (No sign up needed. ) Top patrons and donors: Jameson, John M, Laura M, Pieter G, Vahnekie, Sigmanificient AFFILIATES AND REFERRALS
|
|