[issue10395] new os.path function to extract common prefix based on path components

2012-11-12 Thread Rafik Draoui
Changes by Rafik Draoui ra...@rafik.ca: Added file: http://bugs.python.org/file27974/patch10395-3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10395

[issue10395] new os.path function to extract common prefix based on path components

2012-11-05 Thread Rafik Draoui
Rafik Draoui added the comment: Here is a new patch addressing some of storchaka review comments, and implementing a version in ntpath. For the Windows version, I did as proposed in msg174819, but as I am not familiar with the semantics and subtleties of paths in Windows maybe this version

[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Rafik Draoui
Rafik Draoui added the comment: Here is a patch with an implementation of os.path.commonpath, along with tests and documentation. At the moment, this is only implemented for POSIX, as I don't feel like I know enough about Windows to tackle drive letters and UNC in paths without spending some