[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 of ntpath.commonpath is too simplistic and would return wrong results 
in some cases. I would like someone more knowledgeable in Windows to take care 
of it, or maybe just provide a test suite with lots of different corner cases 
that I could use to provide a better implementation.

--
Added file: http://bugs.python.org/file27899/patch10395-2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 more time on it.

This probably needs more tests for corner cases.

--
nosy: +rafik
Added file: http://bugs.python.org/file27883/patch10395

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com