[Python-ideas] os.path.isparent and os.path.ischild

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Jul 14 04:49:56 CEST 2011


Paul Colomiets wrote:

> Do you mean:
 >
>>>>dirname('/a/b') == '/a'
> 
> True

It's not so easy if you want isparent("/a", "/a/b/c") to
be true as well.

-- 
Greg



More information about the Python-ideas mailing list