dwave.cloud.config.get_configfile_path

get_configfile_path()[source]

Return the highest-priority local configuration file.

Selects the top-ranked configuration file path from a list of candidates returned by get_configfile_paths(), or None if no candidate path exists.

Returns:Configuration file path.
Return type:str

Examples

This example displays the highest-priority configuration file on a Windows system running Python 2.7.

>>> import dwave.cloud as dc
>>> # Display paths
>>> dc.config.get_configfile_paths(only_existing=False)   # doctest: +SKIP
[u'C:\ProgramData\dwavesystem\dwave\dwave.conf',
 u'C:\Users\jane\AppData\Local\dwavesystem\dwave\dwave.conf',
 '.\dwave.conf']
>>> # Find highest-priority local configuration file
>>> dc.config.get_configfile_path()   # doctest: +SKIP
u'C:\Users\jane\AppData\Local\dwavesystem\dwave\dwave.conf'