On 1/24/19, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Thu, 24 Jan 2019 14:42:59 -0500, Dave <dboland9 at offilive.com> declaimed
> the following:
>>3. File location? I'm using Ubuntu and I believe that the correct
>>location would be home/.config/<app-name> . What about Mac and Windows?
That should be "%UserProfile%\AppData\Roaming". This is the default
path, which should never be used directly because "Roaming" is
relocatable. Use "%AppData%" instead.
That said, relying on environment variables isn't the best practice.
The value might be wrong if the folder was relocated after our process
tree was created. Use the shell's well-known-folder interface instead.
from win32com.shell import shell
kfmgr = pythoncom.CoCreateInstance(
appdata = kfmgr.GetFolder(shell.FOLDERID_RoamingAppData)
appdata_path = appdata.GetPath()