I have simple python script, 'first.py':
#first.py
def firstFunctionEver() :
    print "hello"
firstFunctionEver()
I want to call this script using : python first.py and have it call the firstFunctionEver(). But, the script is ugly -- what function can I put the call to firstFunctionEver() in and have it run when the script is loaded?
if __name__ == "__main__":
    firstFunctionEver()
Read more at the docs here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With