2

I have a simple Python script that all it does is:

import sys
print sys.argv

When I open cmd and type

MyScript.py arg1

I get:

['C:\\MyScript.py']

But when type:

python MyScript.py arg1

I get:

['C:\\MyScript.py', 'arg1']

I've looked around here but did not find my answer.

I've uninstalled and re-installed Python 2.7.9 and it did not resolve it. Any idea?

UpAndAdam
  • 4,515
  • 3
  • 28
  • 46
idanshmu
  • 5,061
  • 6
  • 46
  • 92

1 Answers1

1

I actually had the same problem, i had to iterate through all python's occurrences over the registry and manually append the %* to the execution path

c:\...python "%1" to c:\...python "%1" %* 
xiº
  • 4,605
  • 3
  • 28
  • 39
igal k
  • 1,883
  • 2
  • 28
  • 57