0
1
If I execute my script by:
C:\Windows\System32>python C:\Code\Test.py XXX
It takes the argument but if I execute script by:
Test.py XXX
error occurs: IndexError...
So arguments do not pass to script. I have set the associations in Windows to open .py files with Python2.6. Running python programs from the command files runs well. However, if I type:
C:\Windows\System32>assoc .py
File association not found for file .py
Similarly:
C:\Windows\System32>ftype Python.File
File type 'Python.File' not found or no open command associated with it.
PATH environment has been set properly: it has C:\Python26;as well as C:\Python26\Scripts. I have made sure that PATHTEXT has .PY in it. I can run my scripts, including iPython, easy_install, etc. without problems.
I have read about similar problems here in stackoverflow. A solution that has been suggested is to go to RegEdit, and look for all the occurrences of Python26 and make sure that the value data field has "C:\Python26\python.exe" "%1" %* instead of "C:\Python26\python.exe" "%1" when appropriate.
I am almost sure that I have done all of that, and I am still having the problem. I don’t know what else to do, and I am still learning a lot of these things as I go along, so I am not an expert and don't know what commands to type to test.
I am running Windows 7 on an iMac (Mac OS X Version 10.7.3) using Parallel, with 16GB of RAM. The reason I am using Windows on a iMac is because I am new to Mac, and I still don’t feel comfortable with all the Mac commands; however, I am starting to suspect that the problem is not with Python or Windows 7, but Parallel.
Thank you very much for your help
I don't see any specific question. Can you reword? What isn't exactly working? what error do you get? do you only want to associate
.py
topython.exe
? – KurzedMetal – 2012-05-10T13:17:41.843Thank you. I reworded the question. Basically, arguments are not passed to the script. From the command prompt, it looks like there is no association to .py files, but in PATH and PATHTEXT, I can see that there is association. – None – 2012-05-10T13:43:04.437