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 ncoghlan
Recipients ncoghlan, skip.montanaro
Date 2008-12-27.04:24:11
SpamBayes Score 0.003997797
Marked as misclassified No
Message-id <1230351852.39.0.694414055794.issue4755@psf.upfronthosting.co.za>
In-reply-to
Content
A new function sounds like a good solution to me. How about just calling
it "os.path.commonpath" though?

I agree having a path component based prefix function in os.path is
highly desirable, particularly since the addition of relpath in 2.6:

base_dir = os.path.commonpath(paths)
rel_paths = [os.path.relpath(p, base_dir) for p in paths]
History
Date User Action Args
2008-12-27 04:24:12ncoghlansetrecipients: + ncoghlan, skip.montanaro
2008-12-27 04:24:12ncoghlansetmessageid: <1230351852.39.0.694414055794.issue4755@psf.upfronthosting.co.za>
2008-12-27 04:24:11ncoghlanlinkissue4755 messages
2008-12-27 04:24:11ncoghlancreate