Martin> I don't think any change is necessary. os.path.commonprefix Martin> works just fine on path components: ...
Ummm... >>> os.path.commonprefix(["/export/home", "/etc/passwd"]) '/e' I suppose that's correct given the defined behavior of the function, but it certainly doesn't seem to be very path-like to me. Martin> Of course, using it that way would require a library function Martin> that reliably splits a path into components; I think one would Martin> have to do abspath on arbitrary inputs. See <http://bugs.python.org/issue4755> for what I think is a function with more predictable behavior given that we are discussing paths and not just strings. Skip _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com