path module

Ian Bicking ianb at colorstudy.com
Tue Jul 8 09:57:49 CEST 2003


I think Jason Orendorff's path module is really nice:
  http://www.jorendorff.com/articles/python/path/

Beats the hell out of os.path, which is an ugly thing indeed.  The OO
interface means you could use the interface nicely to implement other
things, like URLs.  The problem?  It's just some module.  The various os
functions (of which path replaces quite a few) have become idiomatic to
me, and I'm sure others as well.  I find myself reluctant to use it in
code that's not essentially private, because it's changing something
small and seemingly trivial, and people won't be familiar with it.

The solution?  It should be a builtin!  Or, if not a builtin, included
in the os module.  But I actually like the idea of it being a builtin --
if open is a builtin, path stands right up there too.  It would get rid
of 90% of the use of the os module.

Thoughts?  Reactions?

  Ian







More information about the Python-list mailing list