Message279432
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))) |
|
Date |
User |
Action |
Args |
2016-10-25 17:59:04 | eryksun | set | recipients:
+ eryksun, r.david.murray, stephan |
2016-10-25 17:59:04 | eryksun | set | messageid: <1477418344.96.0.198919040015.issue28530@psf.upfronthosting.co.za> |
2016-10-25 17:59:04 | eryksun | link | issue28530 messages |
2016-10-25 17:59:04 | eryksun | create | |
|