Author eric.smith
Recipients amjad ben hedhili, eric.smith
Date 2018-03-19.13:57:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521467834.85.0.467229070634.issue33102@psf.upfronthosting.co.za>
In-reply-to
Content
Path.parents will do what you want. I don't have a Windows box handy, but this is on MacOS:

>>> from pathlib import Path
>>> p = Path("/Users/User/AppData/Local/Programs/Python/Python36/Lib/asyncio/__init__.py")
>>> p.parents[1]
PosixPath('/Users/User/AppData/Local/Programs/Python/Python36/Lib')
>>>
History
Date User Action Args
2018-03-19 13:57:14eric.smithsetrecipients: + eric.smith, amjad ben hedhili
2018-03-19 13:57:14eric.smithsetmessageid: <1521467834.85.0.467229070634.issue33102@psf.upfronthosting.co.za>
2018-03-19 13:57:14eric.smithlinkissue33102 messages
2018-03-19 13:57:14eric.smithcreate