Your indentation is broken. This should fix it:
import sys
def hello(a,b):
print 'hello and thats your sum:'
sum=a+b
print sum
if __name__ == "__main__":
hello(sys.argv[1], sys.argv[2])
Obviously, if you put the if __name__
statement inside the function, it will only ever be evaluated if you run that function. The problem is: the point of said statement is to run the function in the first place.