[wingide-users] Getting the User Settings Directory programatically

Wing IDE Support support at wingware.com
Sun Feb 24 13:04:27 EST 2013


On 2/23/13 1:00 PM, Martin Fiers wrote:
> Hello,
> 
> Thank you for the quick response. I'm afraid I was not completely clear
> in my question 2: I would like to request this from outside the Wing
> IDE. So in fact, the setup.py script for our software should be able to
> find out this folder without running Wing or an extension script.
> 
> Would that be possible in some way?

The Wing user settings directory name is predictable, especially on
Linux and OS X where it is:

~/.wingide4

On Windows it's a bit more variable because the name of the Application
Data dir changes depending on the Windows version, but this Python code
should do the trick:

import os
os.path.join(os.environ['APPDATA'], 'Wing IDE 4')

These names are for Wing IDE Professional and won't change in any Wing
version 4 release.

Cheers,

John


More information about the wingide-users mailing list