Eryk Sun <eryk...@gmail.com> added the comment:

> I don't think is cross-platform, because I'm still on Windows but 
> in different shells.

MSYS/MINGW64 and Cygwin are POSIX runtime environments implemented in DLLs, but 
they're layered over Windows and can thus support Windows paths such as 
r"C:\Temp" in addition to the platform's native paths such as "/c/Temp" or 
"/cygdrive/c/Temp". 

(The real native path is neither Windows nor POSIX. It's an NT path such as 
r"\??\C:\Temp", for which r"\??" combines searching the per-logon and global 
directories that contain device symlinks and "C:" is a symlink to an NT volume 
device such as r"\Device\HarddiskVolume2". Device symlinks are typically 
persisted in the registry and stable, such as DOS drives and volume GUID names, 
whereas actual device names are typically enumerated and unreliable.)

I assume you're using a Python package built for MSYS2. For example:

    $ python
    Python 3.6.2 (default, Sep  7 2017, 13:16:50)
    [GCC 6.3.0] on msys
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import platform
    >>> platform.system()
    'MINGW64_NT-10.0'

(The platform name depends on the value of the MSYSTEM environment variable at 
startup. In an MSYS development environment it's "MSYS" instead of "MINGW64". 
In both cases sys.platform is "msys".) 

It seems you want MSYS2 and Cygwin support added to pathlib -- maybe as a 
subclass of PosixPath. I think David is right that this deserves to be 
discussed on python-ideas.

----------
nosy: +eryksun

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

Reply via email to