[issue6208] path separator output ignores shell's path separator: / instead of \

Nick Coghlan report at bugs.python.org
Wed Nov 13 23:30:37 CET 2013


Nick Coghlan added the comment:

We can't change os.sep globally for the process because the Windows APIs
don't reliably accept forward slashes. Changing it when the Windows binary
is run through msys would thus mean potentially breaking currently working
applications.

Using the Cygwin Python instead is safer, since all the affected OS API
calls will be trapped by Cygwin's POSIX API implementation and translated
appropriately for Windows.

Terry's description when first closing this issue remains accurate: MS
created this mess through an atrociously poor choice of path separator
decades ago, and until *all* their APIs natively accept forward slashes as
path separators (which seems unlikely to ever happen), the only backwards
compatible answer currently appears to be to use a full POSIX interface
layer like Cygwin.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6208>
_______________________________________


More information about the Python-bugs-list mailing list