There's a problem with running installed scripts on Windows which can be seen below
C:\Users\Piotr>where python
C:\program files\Python\2.7\python.exe
C:\Users\Piotr>python c:\program files\Python\2.7\scripts\ve init
[Errno 2] No such file or directory
Is "ve-init" executable in the current path?
C:\Users\Piotr>
I tried to resolve this by following advices in How to run installed python script? question but with no luck:
C:\Users\Piotr>assoc .py
.py=Python.File
C:\Users\Piotr>ftype Python.File
Python.File=c:\program files\Python\2.7\python.exe "%1" %*
C:\Users\Piotr>dir /b "c:\program files\python\2.7\scripts"
easy_install-2.7-script.py
easy_install-2.7.exe
easy_install-script.py
easy_install.exe
pip-2.7-script.py
pip-2.7.exe
pip-script.py
pip.exe
ve-clone
ve-extend
ve-init.py
ve.py
virtualenv-script.py
virtualenv.exe
C:\Users\Piotr>python c:\program files\Python\2.7\Scripts\ve.py init
[Errno 2] No such file or directory
Is "ve-init" executable in the current path?
I think what's special in this case is that ve script runs command scripts (ve-init, ve-clone etc.) through OS (os.execvp()).
ve-initto be runnable by windows. How does windows know how to run it if it's notve-init.pywith the correct file association?ve-initwhen you need to be runningve-init.py-- there is nove-initin that list. Even with the association you still need the full file name?vescript does (command = 've-%s' % commandand thenreturn os.execvp(command, (command, ) + args). I would have to modify these scripts and I'd like to avoid doing this if there's some other way to get it working..pyextension or callpythonexplicitly.