This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dustin.Oprea
Recipients Dustin.Oprea, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-06-27.21:03:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467061421.97.0.269034608873.issue27403@psf.upfronthosting.co.za>
In-reply-to
Content
Notice that os.path.dirname() returns whatever it is given if it is given a URN, regardless of slash-type. Oddly, you have to double-up the forward-slashes (like you're escaping them) in order to get the correct result (if you're using forward-slashes). Back-slashes appear to be broken no matter what.

C:\Python35-32>python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os.path
>>> os.path.dirname("\\\\a\\b")
'\\\\a\\b'
>>> os.path.dirname("//a/b")
'//a/b'
>>> os.path.dirname("////a//b")
'////a'

Any ideas?
History
Date User Action Args
2016-06-27 21:03:42Dustin.Opreasetrecipients: + Dustin.Oprea, paul.moore, tim.golden, zach.ware, steve.dower
2016-06-27 21:03:41Dustin.Opreasetmessageid: <1467061421.97.0.269034608873.issue27403@psf.upfronthosting.co.za>
2016-06-27 21:03:41Dustin.Oprealinkissue27403 messages
2016-06-27 21:03:41Dustin.Opreacreate