Michael Foord wrote:
Larry Hastings wrote:
I've written a patch for Python 3.1 that changes os.path so it handles UNC paths on Windows:
+1 for the feature. I have to deal with Windows networks from time to time and this would be useful.
+1 from me, too. I haven't looked at the implementation, but for sure the feature would be welcome.
In the interests of full disclosure: I submitted a patch providing this exact behavior just over ten years ago. GvR accepted it into Python 1.5.2b2 (marked "*EXPERIMENTAL*") and removed it from 1.5.2c1.
In the intervening decade, two highly relevant things have happened: * Python no longer uses ntpath for os.path on Cygwin. Instead it uses posixpath. * Cygwin removed the "//a/foo" drive letter hack. In fact, I believe it now support UNC paths. Therefore this patch will have no effect on Cygwin users.
Yes, cygwin supports UNC paths with //host/share, and they use /cygdrive/a, etc., to refer to physical drives. It's been that way for as long as I recall, at least 7 years.