Alan Meyer wrote: > This is not properly portable to all OS, but you could simply split on > the slash character, e.g., > > pathname.split('/') more portable pathname.split(os.sep)