Axes — list of floats?

Hi! In a script, I’m trying to check whether master.axes match a certain location:

location = [100, 100]
if master.axes == location: …

The documentation says that “axes” is a list of floats, but it prints each float on a new line, which makes it not comparable to a simple list like [1, 2, 3]. Could you please help, how to format that “location” list to make it comparable?

For a Python list, whitespace doesn’t matter. Make sure it really is a Python list and not a NSMutableDict, you can check with type(). You may need to convert to a list with list().

1 Like

Thank you, converting to a list works!