Author eryksun
Recipients eryksun, r.david.murray, stephan
Date 2016-10-25.17:59:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477418344.96.0.198919040015.issue28530@psf.upfronthosting.co.za>
In-reply-to
Content
os.DirEntry exists in 3.6, but the change wasn't backported to 3.5. See issue 27038. As a workaround, you can scan a non-empty directory to get a reference to the DirEntry type, e.g.:

    import os
    import tempfile

    with tempfile.NamedTemporaryFile() as f:
        path = os.path.dirname(f.name)
        DirEntry = type(next(os.scandir(path)))
History
Date User Action Args
2016-10-25 17:59:04eryksunsetrecipients: + eryksun, r.david.murray, stephan
2016-10-25 17:59:04eryksunsetmessageid: <1477418344.96.0.198919040015.issue28530@psf.upfronthosting.co.za>
2016-10-25 17:59:04eryksunlinkissue28530 messages
2016-10-25 17:59:04eryksuncreate