Topics

Configuration directories

Andy B.
 

Hi,

I am attempting to access configuration directories from inside an add-on. So far, NVDA has given me the user's installed config path, the system config path, the add-ons install folder, the scratchpad folder. It hasn't managed to give me speech synths, profiles, or speech dictionaries. Does anyone know how to get the paths for these extra components? I need to have the function name or python dict that has these because each user's system is different.

James Scholes
 

I might be misunderstanding your question, but if you have the user's config directory path, you can just use os.path.join with that as the first part, and profiles, speechDicts, etc. as the second. Or are you trying to accomplish something else? These names shouldn't differ system to system, because if they do, NVDA just won't be able to load data from them.

keep in mind that synth drivers should really be packaged as add-ons these days, so there's not going to be a single directory which contains them all.

Regards,

James Scholes

On 30/03/2020 at 2:27 pm, Andy B. wrote:
Hi,
I am attempting to access configuration directories from inside an add-on. So far, NVDA has given me the user's installed config path, the system config path, the add-ons install folder, the scratchpad folder. It hasn't managed to give me speech synths, profiles, or speech dictionaries. Does anyone know how to get the paths for these extra components? I need to have the function name or python dict that has these because each user's system is different.

Andy B.
 

If I do the following at the NVDA interactive Python prompt:

>>>import config
>>>config.getUsersInstalledConfigPath()
['C:\\Users\\a_bor\\AppData\\Roming\\nvda']
>>>import addonHandler
>>>addonHandler._getDefaultAddonPaths()
[C:\\Users\\a_bor\\AppData\\Roming\\nvda\\addons']

I am interested in creating a settings packaging system sort of like the one found in JAWS. To allow users the choice of what kind of settings to backup/restore, I need to know where the system holds these files, and the config/addon system looked like a good option.