And last but not least, Popen behavior on Windows makes it difficult to write 
OS-independent Python code which calls external commands that are not binary by 
default:

2 examples:

1. I wrote a coffeetools package which wraps the CoffeeScript compiler in a 
Python API. The 'coffee' command is a Node.js script. And under Windows it is 
installed with a 'coffee.cmd' wrapper to make it callable. So to make Popen 
work you have to switch and call 'coffee' on Unix and 'coffee.cmd' on Windows. 
But from the Windows shell you can just call 'coffee'. Maybe in the future the 
.cmd changes to .bat ...

2. I the embedded portable git from SourceTree instead of the standard Windows 
git installation. It has a git.bat wrapper which calls the internal git.exe 
(which must be in the same dir with a lot of other included ported Unix tools 
and therefore not recommended to add that dir to PATH). That made the dulwich 
package unworkable for me because it just tries to Popen(['git', ...]). And I 
am currently trying to make the dulwich developers accept my pull request with 
a workaround...
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to