main() function doesn't run when running script
python
Solution
You still have to call the function.
def main(): # declaring a function just declares it - the code doesn't run
print("boo")
main() # here we call the function
Problem
Consider: ``` #! /usr/bin/python def main(): print("boo") ``` This code does nothing when I try to run it in Python 3.3. No error or anything. What’s wrong? ``` gvim script chmod 775 script ./script ```