[ python-Feature Requests-894936 ] Have a split corresponding with os.path.join

SourceForge.net noreply at sourceforge.net
Wed Feb 11 11:36:29 EST 2004


Feature Requests item #894936, was opened at 2004-02-11 11:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=894936&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nicolas Fleury (nidoizo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Have a split corresponding with os.path.join

Initial Comment:
I would be nice to have a function to do the exact
opposite of os.path.join, something like an
os.path.splitall or fullsplit.

Rationale:
Currently, on Windows, using os.path.split produce the
following result:
 os.path.split('Z:/xyz') => ('Z:/', 'xyz')
It exceptionaly keep the \ after the drive.  This
exception makes str.split incompatible with
os.path.join that is expecting the \.

Spliting fully a path is useful when transforming
absolute paths to relative paths.  I could also be nice
to have a function to do that in os.path.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=894936&group_id=5470



More information about the Python-bugs-list mailing list