title: Python Script does not take sys.argv in Windows
body: <p>I have two computers with Windows, and I just found that on one of them, if I ran python code directly, like:</p>
  <pre><code>test_args.py input1 input2
  </code></pre>
  <p>Python will not recognized the input I gave, but this works:</p>
  <pre><code>python test_args.py input1 input2
  </code></pre>
  <p>I tried the code:</p>
  <pre><code>import sys
  
  print 'Number of arguments:', len(sys.argv), 'arguments.'
  print 'Argument List:', str(sys.argv)
  </code></pre>
  <p>And the first way(test_args.py input1 input2) returns:</p>
  <pre><code>Number of arguments: 1 arguments.
  Argument List: ['D:\\Test\\args\\test_args.py']
  </code></pre>
  <p>While the sceond way (python test_args.py input1 input2) returns:</p>
  <pre><code>Number of arguments: 3 arguments.
  Argument List: ['D:\\Test\\args\\test_args.py', 'input1', 'input2']
  </code></pre>
  <p>Any idea on what this could happen?
  This issue only happens in one of my computers, both have same version of Windows.</p>
  <p>Thanks!</p>
  <h2>SOLVED:</h2>
  <p>I search in regedit keyword &quot;python&quot; and found two keys missing %* after &quot;C:\Python27\python.exe&quot; &quot;%1&quot;:</p>
  <p>Computer\HKEY_CLASSES_ROOT\Applications\python.exe</p>
  <p>Computer\HKEY_CLASSES_ROOT\py_auto_file\shell\open\command</p>
  <p>And .py is associated with py_auto_file even though I tried assoc .py Python.File</p>
  <p>Changing the two keys fixed this issue, thanks!</p>