Checking for component objects.
-
Another simple question, how do I check for components. Is it because they are "objects" that I'm running into problems?
ex.
if not f[i].components['<Component for K>']: f[i].appendComponent('K')
-
Thank u Jens!
-
thanks Jens!
-
Something along these lines:
component_names = [component.baseGlyph for component in f[i].components] if not "K" in component_names: f[i].appendComponent("K")