Glyphs with background paths

Hello! I’ve been trying to spot the glyphs in my font that don’t have assigned background paths.

If I write:

myLayers = Glyphs.font.selectedLayers
for thisLayer in myLayers:
  print thisLayer.parent.name
  print thisLayer.background.paths

Then I get the names of the glyphs and the paths:
A-cy
(<GSPath 26 nodes and 14 segments>, <GSPath 4 nodes and 4 segments>)
Be-cy
(<GSPath 31 nodes and 15 segments>, <GSPath 15 nodes and 7 segments>)
Ve-cy
()
Ge-cy
()
etc.

But I wanted to be able to find only the glyphs that don’t have paths in the background.
Thank you so much!

You can do something like this:

for thisLayer in myLayers:
    if len(thisLayer.background.paths) > 0:
        print thisLayer.parent.name

p.s. if you put three graves before and after the code part, it will look better. I changed it in your post.

Thank you so much @GeorgSeifert ! Strange enough now it prints all the glyph names. And most of them do have background paths.

I’ve changed it to

for thisLayer in myLayers:
if len(thisLayer.background.paths) < 1:
print thisLayer.parent.name

And it works! Thank you!