urlsplit() and windows paths

Patrick Mézard pmezard at gmail.com
Tue Oct 28 19:13:57 EDT 2008


Hello,

Why does urlparse.urlsplit() succeed here ?


"""
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urlparse
>>> urlparse.urlsplit('c:\\foo\\bar')
('c', '', '\\foo\\bar', '', '')
"""

Documentations (of urlparse(), referenced by urlsplit()) states:

"""
Parse a URL into six components, returning a 6-tuple. This corresponds to the general structure of a URL: scheme://netloc/path;parameters?query#fragment.
"""

What kind of URLs does it parse not containing "://" ?

--
Patrick Mézard



More information about the Python-list mailing list