Message277613
is_dir is a *method*. To find out if an entry is a directory, you need to call it.
So you need
from os import DirEntry, scandir
def test_is_dir():
for item in os.scandir(TEST_DIR):
if item.is_dir():
# ^^ note change
print(item.path)
return
TEST_DIR = '.'
test_is_dir() |
|
Date |
User |
Action |
Args |
2016-09-28 12:50:52 | paul.moore | set | recipients:
+ paul.moore, tim.golden, zach.ware, steve.dower, David Staab |
2016-09-28 12:50:52 | paul.moore | set | messageid: <1475067052.5.0.696521444041.issue28299@psf.upfronthosting.co.za> |
2016-09-28 12:50:52 | paul.moore | link | issue28299 messages |
2016-09-28 12:50:52 | paul.moore | create | |
|