I have a small (self-written) python script located in, let's say, C:\dummy\myscript.py
.
In my Windows 7 terminal, I can call this script with either one of the following three commands. They all work.
C:\dummy>python myscript.py
C:\dummy>myscript.py
C:\dummy>myscript
I understand that the latter two commands work out fine because of the correct assoc .py=Python.File
setting on my system(see here)
However, when I am in another folder, say, C:\dummy\subfolder\
, it only works when I prepend the python executable.
C:\dummy\subfolder>python ../myscript.py
C:\dummy\subfolder>../myscript.py <-- doesn't work
'..' is not recgnized as an internal or external command,
operable program or batch file.
C:\dummy\subfolder>../myscript <-- doesn't work
'..' is not recgnized as an internal or external command,
operable program or batch file.
Why doesn't it work in the other two cases?