Author paul.moore
Recipients David Staab, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-09-28.12:50:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475067052.5.0.696521444041.issue28299@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2016-09-28 12:50:52paul.mooresetrecipients: + paul.moore, tim.golden, zach.ware, steve.dower, David Staab
2016-09-28 12:50:52paul.mooresetmessageid: <1475067052.5.0.696521444041.issue28299@psf.upfronthosting.co.za>
2016-09-28 12:50:52paul.moorelinkissue28299 messages
2016-09-28 12:50:52paul.moorecreate