Why is my Python script not running via command line?
<p>Thanks!</p>

<pre><code>def hello(a,b):
    print "hello and that's your sum:"
    sum=a+b
    print sum
    import sys

if __name__ == "__main__":
hello(sys.argv[2])
</code></pre>

<p>It does not work for me, I appreciate the help!!! 
Thanks!</p>

<ul>
<li>Import <code>sys</code> in <strong>global scope</strong>, not in the end of the function.</li>
<li>Send <strong>two arguments</strong> into <code>hello</code>, one is not enough. </li>
<li>Convert these arguments to <strong>floats</strong>, so they can be added as numbers.</li>
<li><strong>Indent</strong> properly. In python indentation <em>does</em> matter.</li>
</ul>

<p>That should result in:</p>

<pre><code>import sys

def hello(a, b):
    sum = a + b
    print "hello and that's your sum:", sum

if __name__ == "__main__":
    hello(float(sys.argv[1]), float(sys.argv[2]))
</code></pre>

python