Laurent Birtz added the comment:

I agree with the "no magic bullet" point and that Microsoft is fully to blame 
for the situation.


About the catalogue of Windows APIs that accept slashes. I've read in various 
places that the only problematic case is the legacy shell API. The power shell 
seems to accept forward slashes.

http://stackoverflow.com/questions/18464038/is-it-possible-to-make-vim-use-forward-slashes-on-windows

http://stackoverflow.com/questions/10523708/why-does-the-cmd-exe-shell-on-windows-fail-with-paths-using-a-forward-slash


Is it reasonable to believe that most Python programs don't care about the 
legacy shell API? I assume that the Python library uses CreateProcess() under 
the hood without touching cmd.exe. Some odd Python programs may invoke cmd.exe 
explicitly but hopefully that is a rare case.

If those assumptions hold, then changing os.sep *from the user script* would 
not break backward compatibility and allow Python to work as expected on MinGW. 
Arguably it's a simpler solution than requiring Python projects like Mercurial 
to tackle that issue themselves. Even if it's not the perfect solution, it's a 
step-up from "Non-Cygwin Python corrupts paths on MinGW and you can't make it 
stop".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6208>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to