So, it took us a while to figure out what you were talking about - the "Menu Items" folder isn't something that appears to be used very much so it took some head scratching for it to dawn on us (I'm getting old so the memory isn't what it used to be).
Anyway - scripts in that directory are executed in their own process - so they don't have access to plugin prefs from the plugin in which they reside. Think of them as standalone Indigo Python scripts that are executed from the Execute Script action pointing to a Python file - that's basically what they are.
When you say:
What's the preferred method to get config prefs from other places within the package?
I'm a bit unclear what you're going for. Preferences are plugin-based - so plugins have prefs for the plugin itself and any object types that it defines (devices, actions, events, etc.). So you can access/change those from any python code that is run as part of the normal operation of the plugin itself (which leads to building your own plugin as stated above). Scripts external to those plugin processes will never have write access to that data since they could break the plugin's operation.
However, if you're just looking for a way to share generic data between scripts, then there are a couple of options:
- Do what you're doing now and store it in variables. This has the advantage that it provides you with a UI to change/set the data without having to build a plugin with the various config UIs.
- You can store the data in separate files which each script can load.
- You can create an attachment script that handles the file i/o from #2 above then have all your scripts just load that module (see the Shared Classes and Methods section of the Scripting Tutorial for details). I believe this answers your second question - it's definitely the pythonic way of sharing objects/methods.
Indigo doesn't present a generic database-like interface for scripts (as opposed to plugins) other than Indigo variables.