Access Multiple Scripting Library Variables from Script

I have more than 10 different string variables defined in a scripting project library. Of course, I can access them individually via library.varName, but if I'm access 10 of them within the same script that gets annoying.

Is there a way to declare that the script should look in that library for variables as well?

I know this is really a general Python question, but not quite sure how to Google this one.

Technically, yes, you could do something silly like pack them into a dictionary and then unpack that dictionary into locals(), probably...

But I wouldn't. Explicit > implicit, even if it means some extra typing in the short term.

1 Like

Well, since I'm using these constants to unpack values from a dictionary already I think that would be extremely silly :sweat_smile: at least there's copy/paste