On 15/06/2014 08:54, Paul Moore wrote: > On 15 June 2014 00:15, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote: >> However, it says the Windows version uses CreateProcess, which >> doesn't use PATH. > > Huh? CreateProcess uses PATH: Just to be precise: CreateProcess *doesn't* use PATH if you pass an lpApplicationName parameter. It *does* use PATH if you pass a lpCommandLine parameter without an lpApplicationName parameter. It's possible to do either via the subprocess module, but the latter is the default. If you call: subprocess.Popen(['program.exe', 'a', 'b']) or subprocess.Popen('program.exe a b']) Then CreateProcess will be called with a lpCommandLine but no lpApplicationName and PATH will be searched. If, however, you call: subprocess.Popen(['a', 'b'], executable="program.exe") then CreateProcess will be called with lpApplicationName="program.exe" and lpCommandLine="a b" and the PATH will not be searched. TJG
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4