I’m working on a plugin & currently have a dictionary of strings within the plugin.py file.
I’m looking for a way to externalize the dictionary to the plugin.sublime-settings file, in order to give the user the ability to define characters & strings that are used in the code.
I know that something like settings.get(“char_Example1”) would work for individual variables, but I have a LOT of dictionary entries & the code uses an integer loop to use them accordingly.
@ (my) plugin.py (Python)
dict_char_Example = {}
dict_char_Example[1] = "☻"
dict_char_Example[2] = "•"
@ (a typical) plugin.sublime-settings (JSON)
{
"char_Example1": "☻",
"char_Example2": "•",
}
Any ideas on how to transfer a dictionary between the two files?