Welcome back!
On Windows, you can run a Python script on the PATH simply with its name. These should be equivalent:
c:>congeal blood
c:>congeal.py blood
c:>python congeal.py blood
If it's not working that way, fixing PATHEXT and correcting the file type associations with ASSOC and FTYPE will usually do the trick:
c:>set PATHEXT=%PATHEXT%:.PY
c:>ftype Python.File="C:Python25python25.exe" "%1" %*
c:>assoc .py=Python.File
If that still isn't working, try deleting the following registry key:
HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.PY
There's plenty of advice about PATHEXT, FTYPE, and ASSOC, but none of the search terms I tried dug up the registry key. I knew there had to be one, because giving FTYPE silly arguments didn't stop the script from being executed. I found the registry key by brute-force searching the registry for .PY. I'm posting this so that someone else can save that hour of hassle.
{ 2 comments }
Hey,
Few issues. there aren’t any forward slashes in your example above.
I thought this was my saving grace, as I’ve run into the same problem. the .py script i’m calling wont take my args, unless i give the path to that .py script explicitly.
ie.
this works:
python c:\butter\congeal.py bloodbut not this:
congeal bloodI’m using vista biz x64. I’ve tried what you recommended. Nothing’s helping.
-THanks, in advance for any help u can offer.
i guess nobody keeps this up to date.
Comments on this entry are closed.