> 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' This calls it with strings, not with path components. As I said, it works fine for path components: py> os.path.commonprefix([f.split('/') for f in ["/export/home", "/etc/passwd"]]) [''] > 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. See above: the function works for lists as well. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4