Michael Hoffman wrote: > Reinhold Birkenfeld wrote: > > Probably as Terry said: a path is both a list and a string.
[...] > One way to divide this is solely based on path separators: > > ['c:', 'windows', 'system32:altstream', 'test.dir', > 'myfile.txt.zip:altstream'] I would argue that any proposed solution has to work with VMS pathnames. ;-) > The current stdlib solution, os.path.splitext(os.path.splitext(filename) > [0])[0] is extremely clunky, and I have long desired something better. > (OK, using filename.split(os.extsep) works a little better, but you get > the idea.) And also with unusual (eg. RISC OS) filename extensions. To do any justice to the existing solutions, any PEP should review at least the following projects: * The path module (of course): http://www.jorendorff.com/articles/python/path/ * The py.path module (or at least the ideas for it): http://codespeak.net/py/current/doc/future.html * itools.uri http://www.ikaaro.org/itools * Results from the "Object-Oriented File System Virtualisation" project in the "Summer of Code" programme: http://wiki.python.org/moin/SummerOfCode And I hope that the latter project is reviewing some of the other work, if only to avoid the "framework proliferation" that people keep complaining about. Paul -- http://mail.python.org/mailman/listinfo/python-list