Script or function to find glyphs with paths with strokes

Is there a script or function to find which glyphs have paths with strokes, and also a script to expand them?

You want to check for path attributes, e.g., like this:

def hasPathAttributes(glyph):
	for l in glyph.layers:
		for p in l.paths:
			if p.attributes:
				return True
	return False
	
for g in Font.glyphs:
	if hasPathAttributes(g):
		print(g.name)
1 Like