On Wed, Apr 29, 2015 at 11:54 AM, Albert-Jan Roskam
<[email protected]> wrote:
> Hmmm, that sounds pretty convincing indeed (makes it even stranger that CD 
> works the way it works).
> I believe it threw a WindowsError, indicating that the file(s) could not be 
> found, because the dir was
> not changed. I actually first ran into this problem with this script, so with 
> my current script I
> immediately refrained from using cwd:
> http://code.activestate.com/recipes/578883-git-pre-commit-hook-to-reject-large-files-using-py/
> Git gave a fatal error in windows and the pushd/popd fixed it.

I don't see why you'd need shell=True. Windows supports UNC paths in
the working directory, but the cmd.exe shell (being a crusty relic of
the 1980s) does not. So just use the default value, shell=False.
(However, on POSIX systems, unlike Windows, using shell=False requires
`cmd` to be a list.) BTW, there's no need to explicitly pass
cwd=os.getcwd(). The default behavior is to inherit the working
directory of the current process.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to