Suppose you have an executable script.py in current directory that you want to execute. You would definitely need to execute the script through shell, because only shell knows which program should process it.
Windows
subprocess.Popen("script.py",shell=True)
POSIX
subprocess.Popen("./script.py",shell=True)
So you still need to keep in mind that to execute script from current directory you need to prefix the script with ./ under POSIX.
But the ./ should work on windows too.
ReplyDelete