[Python-Dev] os.path.commonprefix
Bernhard Herzog
bh@intevation.de
07 Dec 2002 17:32:32 +0100
Armin Rigo <arigo@tunes.org> writes:
> >>> commonprefix(['/home/users/arigo', '/home/users/alal'])
> '/home/users/a'
>
> What is the use for such a thing ??
I suppose you could use it for something like filename completion as
found in many unix shells. That's perhaps the reason why it's in os.path
and not in string.
Bernhard
--
Intevation GmbH http://intevation.de/
Sketch http://sketch.sourceforge.net/
MapIt! http://www.mapit.de/