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

Giampaolo Rodolà g.rodola at gmail.com
Fri Jul 8 01:08:25 CEST 2011


>>> isparent('/a', '/a/b')
True
>>> isparent('/a/b', '/a')
False

>>> ischild('/a/b', '/a')
True
>>> ischild('/a', '/a/b')
False

Thoughts?

Regards,

--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/



More information about the Python-ideas mailing list